|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.singularsys.jep.functions.PostfixMathCommand com.singularsys.jep.functions.Assign
public class Assign
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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.singularsys.jep.functions.CallbackEvaluationI |
---|
CallbackEvaluationI.Runnable |
Field Summary |
---|
Fields inherited from class com.singularsys.jep.functions.PostfixMathCommand |
---|
curNumberOfParameters, name, NaN, numberOfParameters |
Constructor Summary | |
---|---|
Assign()
|
Method Summary | |
---|---|
java.lang.Object |
evaluate(Node node,
Evaluator pv)
For assignment set the value of the variable on the lhs to value returned by evaluating the right-hand side. |
void |
run(java.util.Stack<java.lang.Object> aStack)
Run the function on the stack. |
Methods inherited from class com.singularsys.jep.functions.PostfixMathCommand |
---|
asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, checkNumberOfParameters, checkStack, getName, getNumberOfParameters, setCurNumberOfParameters, setName, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Assign()
Method Detail |
---|
public java.lang.Object evaluate(Node node, Evaluator pv) throws EvaluationException
evaluate
in interface CallbackEvaluationI
node
- The current nodepv
- The visitor, can be used evaluate the children
EvaluationException
Evaluator
public void run(java.util.Stack<java.lang.Object> aStack) throws EvaluationException
PostfixMathCommandI
run
in interface PostfixMathCommandI
EvaluationException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |