Package com.singularsys.jep.misc.javaops
Class OpEquals
java.lang.Object
com.singularsys.jep.functions.PostfixMathCommand
com.singularsys.jep.misc.javaops.OpEquals
- All Implemented Interfaces:
CallbackEvaluationI,PostfixMathCommandI,Serializable
Function implementing compound assignment operators such as
+=, *= etc.
The operator is specified by the fun parameter in the constructor.- See Also:
-
Field Summary
Fields inherited from class com.singularsys.jep.functions.PostfixMathCommand
curNumberOfParameters, description, name, NaN, numberOfParameters -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFor assignment set the value of the variable on the lhs to value returned by evaluating the right-hand side.Return a description of the function from the properties file.getRoot()Methods inherited from class com.singularsys.jep.functions.PostfixMathCommand
asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, asType, checkNumberOfParameters, getDescription, getDescriptionWithType, getName, getNumberOfParameters, run, setCurNumberOfParameters, setDescription, setName, toString, toString
-
Constructor Details
-
OpEquals
-
-
Method Details
-
getRoot
-
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- 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:
-
getDescription
Description copied from class:PostfixMathCommandReturn a description of the function from the properties file. The property name is the class name followed by ".description". The property is found using theJepMessagesclass, which can be configured to add additional properties files. IfPostfixMathCommand.setDescription(String)has been called, return the description set by that method instead.- Specified by:
getDescriptionin interfacePostfixMathCommandI- Overrides:
getDescriptionin classPostfixMathCommand- Returns:
- the description of the function
-