Class ThreadSafeAssign
java.lang.Object
com.singularsys.jep.functions.PostfixMathCommand
com.singularsys.jep.functions.Assign
com.singularsys.jep.misc.threadsafeeval.ThreadSafeAssign
- All Implemented Interfaces:
CallbackEvaluationI,PostfixMathCommandI,Serializable
An assignment operator so we can do
x=3+4.
This function implements the CallbackEvaluationI interface
so that it handles setting the value of a variable.
Any Variable or functions which implements
LValueI can appear on the left-hand side of the equation.- Since:
- Jep 3.5
- Author:
- Rich Morris
- See Also:
-
Field Summary
Fields inherited from class com.singularsys.jep.functions.PostfixMathCommand
curNumberOfParameters, name, NaN, numberOfParameters -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.singularsys.jep.functions.PostfixMathCommand
asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, checkNumberOfParameters, getName, getNumberOfParameters, run, setCurNumberOfParameters, setName, toString, toString
-
Constructor Details
-
ThreadSafeAssign
public ThreadSafeAssign()
-
-
Method Details
-
evaluate
For assignment set the value of the variable on the lhs to value returned by evaluating the right-hand side.- Specified by:
evaluatein interfaceCallbackEvaluationI- Overrides:
evaluatein classAssign- Parameters:
node- The current nodepv- The visitor, can be used evaluate the children- Returns:
- the value after evaluation. This value will be passed to other functions higher up the node tree. The value can be any type including Double or Vector<Object>
- Throws:
EvaluationException- if the calculation cannot be performed- See Also:
-