public class Parameter
extends java.lang.Object
implements java.io.Serializable
Object
value and its associated Class
type. Note that all values stored in this structure must be serializable. Primitive parameter types are converted their associated Object
type. For example, a primitive boolean
is stored as a Boolean
object: Parameter parameter = new Parameter (new Boolean (boolean), Boolean.class); If the Parameter
value is later referenced, the primitive value can be extracted similar to the following example: if (parameter.getType() == Boolean.class) ((Boolean)parameter.getValue()).booleanValue();Modifier and Type | Field and Description |
---|---|
protected java.lang.Class |
m_classType
Parameter
Class of Object . |
protected java.lang.Object |
m_objValue
Parameter
Object value. |
Constructor and Description |
---|
Parameter()
Default constructor.
|
Parameter(boolean bValue)
Constructs a
Parameter from the specified boolean value. |
Parameter(double dValue)
Constructs a
Parameter from the specified double value. |
Parameter(float fValue)
Constructs a
Parameter from the specified float value. |
Parameter(int nValue)
Constructs a
Parameter from the specified int value. |
Parameter(long lValue)
Constructs a
Parameter from the specified long value. |
Parameter(java.lang.Object objValue)
Constructs a
Parameter from the specified Object value. |
Parameter(java.lang.Object objValue, java.lang.Class classValue)
Construct a
Parameter based the the specified value and class. |
Parameter(java.lang.String strValue)
Constructs a
Parameter from the specified String value. |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Clones a copy of this
Parameter object. |
boolean |
equals(java.lang.Object objValue)
Tests this Parameter for true equality
|
java.lang.Class |
getType()
Return the
Class type. |
java.lang.Object |
getValue()
Return the
Object value. |
void |
setType(java.lang.Class classType)
Specifies the
Class type associated with the Parameter . |
void |
setValue(java.lang.Object objValue)
Specifies the
Object value associated with the Parameter . |
java.lang.String |
toString()
Retrieves the
String representation of the Parameter . |
protected java.lang.Object m_objValue
Object
value.protected java.lang.Class m_classType
Class
of Object
.public Parameter()
public Parameter(java.lang.Object objValue, java.lang.Class classValue)
Parameter
based the the specified value and class.objValue
- a Object
value to create Parameter
.classValue
- a Class
value associated with the object.public Parameter(java.lang.Object objValue)
Parameter
from the specified Object
value.objValue
- a Object
value to retrieve Parameter
for.public Parameter(java.lang.String strValue)
Parameter
from the specified String
value.strValue
- a String
value used to create Parameter
.public Parameter(int nValue)
Parameter
from the specified int
value.nValue
- a int
value used to create Parameter
public Parameter(float fValue)
Parameter
from the specified float
value.fValue
- a float
value used to create Parameter
public Parameter(long lValue)
Parameter
from the specified long
value.lValue
- a long
value used to create Parameter
public Parameter(double dValue)
Parameter
from the specified double
value.dValue
- a int
value used to create Parameter
public Parameter(boolean bValue)
Parameter
from the specified boolean
value.bValue
- a int
value used to create Parameter
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Parameter
object.clone
in class java.lang.Object
Object
which represents a clone of this parameter.CloneNotSupportedException
- if cloning is not supportedjava.lang.CloneNotSupportedException
public boolean equals(java.lang.Object objValue)
equals
in class java.lang.Object
objValue
- a Object
value to compare this Parameter
to.boolean
which is true
when the objects are internally equal and false
otherwise.public java.lang.Class getType()
Class
type.Class
which represents the class of the Parameter
.public java.lang.Object getValue()
Object
value.Object
which represents the value of the Parameter
.public void setValue(java.lang.Object objValue)
Object
value associated with the Parameter
.objValue
- a Object
value associated with the Parameter
.public void setType(java.lang.Class classType)
Class
type associated with the Parameter
.classType
- a Class
type associated with the Parameter
.public java.lang.String toString()
String
representation of the Parameter
.toString
in class java.lang.Object