public class ParameterImpl extends Object implements Parameter, ParameterCompilable
Parameter.Parameter.Scope| Constructor and Description |
|---|
ParameterImpl(String name,
Exp defaultExp,
String description,
Type type) |
| Modifier and Type | Method and Description |
|---|---|
Calc |
compile(ExpCompiler compiler) |
protected Object |
convert(Object value) |
static Object |
convertBack(Object value) |
boolean |
equals(Object other)
Returns whether this parameter is equal to another, based upon name,
type and value
|
Object[] |
getChildren() |
Exp |
getDefaultExp()
Returns the expression which provides the default value for this
Parameter.
|
String |
getDescription()
Returns the description of this Parameter.
|
String |
getName()
Returns the name of this Parameter.
|
Parameter.Scope |
getScope()
Returns the scope where this parameter is defined.
|
Type |
getType()
Returns the type of this Parameter.
|
Object |
getValue()
Returns the value of this parameter.
|
int |
hashCode() |
boolean |
isModifiable()
Returns whether the parameter can be modified.
|
boolean |
isSet()
Returns whether the value of this parameter has been set.
|
void |
setDefaultExp(Exp defaultExp) |
void |
setDescription(String description) |
void |
setType(Type type) |
void |
setValue(Object value)
Sets the value of this parameter.
|
void |
unsetValue()
Unsets the value of this parameter.
|
public Parameter.Scope getScope()
Parameterpublic Type getType()
Parameterpublic Exp getDefaultExp()
ParametergetDefaultExp in interface Parameterpublic String getName()
Parameterpublic Object getValue()
ParameterIf Parameter.setValue(Object) has not been called, returns the default
value of this parameter.
The type of the value is (depending on the type of the parameter)
a String, Number, or Member.
public void setValue(Object value)
Parameterpublic boolean isSet()
ParameterIf the value has not been set, this parameter will return its default value.
Setting a parameter to null is not equivalent to unsetting it.
To unset a parameter, call Parameter.unsetValue().
public void unsetValue()
ParameterAfter calling this method, the parameter will revert to its default
value, as if Parameter.setValue(Object) had not been called, and
Parameter.isSet() will return false.
unsetValue in interface Parameterpublic String getDescription()
ParametergetDescription in interface Parameterpublic Object[] getChildren()
public boolean equals(Object other)
public boolean isModifiable()
isModifiable in interface Parameterpublic void setDescription(String description)
public void setType(Type type)
public void setDefaultExp(Exp defaultExp)
public Calc compile(ExpCompiler compiler)
compile in interface ParameterCompilableCopyright © 2021 Hitachi Vantara. All rights reserved.