|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensourcephysics.tools.Parameter
public class Parameter
This represents a parameter expression that is parsed and evaluated as a function of other parameters.
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
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 description| Method Detail |
|---|
public 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.Objectobj - another object
protected double evaluate(java.util.List<?> parameters)
parameters - the input parameters
public double evaluate(Parameter[] parameters)
parameters - the input parameters
public static XML.ObjectLoader getLoader()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||