Class ExpressionValue
java.lang.Object
org.opensourcephysics.ejs.control.value.Value
org.opensourcephysics.ejs.control.value.ExpressionValue
A
ExpressionValue
is a Value
object that
holds an expression is parsed into a double.
- See Also:
-
Field Summary
Fields inherited from class org.opensourcephysics.ejs.control.value.Value
type, TYPE_BOOLEAN, TYPE_DOUBLE, TYPE_EXPRESSION, TYPE_INTEGER, TYPE_OBJECT, TYPE_STRING, VALUE_FALSE, VALUE_NULL, VALUE_TRUE
-
Constructor Summary
ConstructorsConstructorDescriptionExpressionValue
(String _expression, GroupControl _group) Constructor ExpressionValue -
Method Summary
Modifier and TypeMethodDescriptionClones one value into anothervoid
Copies one value into anotherboolean
Returns the value of the variable as a booleandouble
Returns the value of the variable as a doubleint
Returns the value of the variable as an intReturns the value of the variable as an Object.Returns the value of the variable as a Stringvoid
setExpression
(String _expression) Methods inherited from class org.opensourcephysics.ejs.control.value.Value
getType, parseConstant, parseConstantOrArray, toString
-
Constructor Details
-
ExpressionValue
Constructor ExpressionValue- Parameters:
_expression
-_group
-
-
-
Method Details
-
getBoolean
public boolean getBoolean()Description copied from class:Value
Returns the value of the variable as a boolean- Specified by:
getBoolean
in classValue
-
getInteger
public int getInteger()Description copied from class:Value
Returns the value of the variable as an int- Specified by:
getInteger
in classValue
-
getDouble
public double getDouble()Description copied from class:Value
Returns the value of the variable as a double -
getString
Description copied from class:Value
Returns the value of the variable as a String -
getObject
Description copied from class:Value
Returns the value of the variable as an Object. Ideal for arrays! -
setExpression
-
copyValue
Description copied from class:Value
Copies one value into another -
cloneValue
Description copied from class:Value
Clones one value into another- Overrides:
cloneValue
in classValue
-