public class Parameter
extends java.lang.Object
Constructor and Description |
---|
Parameter(java.lang.String name,
java.lang.String function)
Constructor with name and function.
|
Parameter(java.lang.String name,
java.lang.String function,
java.lang.String desc)
Constructor with name, function and description.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Determines if this is equal to another parameter.
|
protected double |
evaluate(java.util.List parameters)
Determines the value of this parameter based on input parameter values.
|
double |
evaluate(Parameter[] parameters)
Determines the value of this parameter based on input parameter values.
|
java.lang.String |
getDescription()
Gets the description of this parameter.
|
java.lang.String |
getExpression()
Gets the expression for this parameter.
|
static XML.ObjectLoader |
getLoader()
Returns an ObjectLoader to save and load data for this class.
|
java.lang.String |
getName()
Gets the name of this parameter.
|
double |
getValue()
Gets the current value of this parameter.
|
boolean |
isExpressionEditable()
Returns true if this parameter's expression is user-editable.
|
boolean |
isNameEditable()
Returns true if this parameter's name is user-editable.
|
void |
setDescription(java.lang.String desc)
Sets the description of this parameter.
|
void |
setExpressionEditable(boolean edit)
Sets the expression editable property.
|
void |
setNameEditable(boolean edit)
Sets the name editable property.
|
public Parameter(java.lang.String name, java.lang.String function)
name
- the namefunction
- the function (parser expression)public Parameter(java.lang.String name, java.lang.String function, java.lang.String desc)
name
- the namefunction
- the function (parser expression)desc
- the descriptionpublic java.lang.String getName()
public java.lang.String getExpression()
public java.lang.String getDescription()
public void setDescription(java.lang.String desc)
desc
- the descriptionpublic double getValue()
public boolean isExpressionEditable()
public void setExpressionEditable(boolean edit)
edit
- true if editablepublic boolean isNameEditable()
public void setNameEditable(boolean edit)
edit
- true if editablepublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- another objectprotected double evaluate(java.util.List parameters)
parameters
- the input parameterspublic double evaluate(Parameter[] parameters)
parameters
- the input parameterspublic static XML.ObjectLoader getLoader()