|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nfunk.jep.function.PostfixMathCommand
org.nfunk.jep.function.Assign
An assignment operator so we can do x=3+4. This function implements the SpecialEvaluationI interface so that it handles seting the value of a variable.
| Field Summary |
| Fields inherited from class org.nfunk.jep.function.PostfixMathCommand |
curNumberOfParameters, numberOfParameters |
| Constructor Summary | |
Assign()
|
|
| Method Summary | |
java.lang.Object |
evaluate(Node node,
java.lang.Object data,
ParserVisitor pv,
java.util.Stack inStack)
For assignment set the value of the variable on the lhs to value returned by evaluating the righthand side. |
| Methods inherited from class org.nfunk.jep.function.PostfixMathCommand |
checkStack, getNumberOfParameters, run, setCurNumberOfParameters |
| 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,
java.lang.Object data,
ParserVisitor pv,
java.util.Stack inStack)
throws ParseException
evaluate in interface SpecialEvaluationInode - The current nodedata - The data passed to visitor, typically not usedpv - The visitor, can be used evaluate the childreninStack - The stack of the evaluator
ParseException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||