public class Parameter extends Object implements Serializable
definition and an object value. Note that a parameter is
allowed to have a null definition, that is, the parameter can be of an unknown type and name; in this
case, only its value is known.
A definition is immutable but this class allows for its parameter value to be set.
| Modifier | Constructor and Description |
|---|---|
|
Parameter(Parameter original)
Copy-constructor for
Parameter. |
|
Parameter(ParameterDefinition definition,
Object value)
Constructor for
Parameter with the given initializers. |
protected |
Parameter(ParameterDefinition definition,
Object value,
boolean isDirty)
Creates a new
Parameter object given the individual parts of the parameter. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
ParameterDefinition |
getDefinition()
Returns the parameter's definition.
|
String |
getName()
This is a convienence method to get the name of the parameter from its
definition. |
Object |
getValue()
Returns the parameter's data value.
|
int |
hashCode() |
boolean |
isDirty()
Returns
true if the dirty flag has been set; that is, if setValue(Object) has been called,
thus changing the value of this object's original value. |
void |
setValue(Object value)
Sets the parameter's data value.
|
String |
toString()
Same as
toString(true). |
String |
toString(boolean showValue)
Will provide the string form of the parameter but the value's actual toString will only be returned in the string
if
showValue is true. |
public Parameter(Parameter original)
Parameter.original - the original to copyprotected Parameter(ParameterDefinition definition, Object value, boolean isDirty)
Parameter object given the individual parts of the parameter.definition - the parameter's definitionvalue - the value of the parameterisDirty - the flag to indicate if the parameter's value was changed (i.e. different than its original or
default value)public Parameter(ParameterDefinition definition, Object value)
Parameter with the given initializers. Note that the definition may be null,
in which case nothing is known about the parameter other than its value.definition - the object that defines the parameter metadata like its name, type, etc. (may be
null)value - the actual value of the parameter (may be null)public String getName()
definition.public ParameterDefinition getDefinition()
null, in which case you don't know anything about
the parameter other than its value.public Object getValue()
null.public void setValue(Object value)
null. The dirty flag is set when
this method is called.value - the parameter valuepublic boolean isDirty()
true if the dirty flag has been set; that is, if setValue(Object) has been called,
thus changing the value of this object's original value.true if the parameter's value was changed from its original value from the time this object
was instantiatedpublic String toString()
toString(true).toString in class ObjectObject.toString()public String toString(boolean showValue)
showValue is true. If it is false, the value will be omitted from the
string.showValue - if true, the parameter's value will be in the returned string, it will not be if
falseObject.toString()public boolean equals(Object obj)
equals in class ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class ObjectObject.hashCode()Copyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.