org.nfunk.jep.function
Class Assign
java.lang.Object
org.nfunk.jep.function.PostfixMathCommand
org.nfunk.jep.function.Assign
- All Implemented Interfaces:
- CallbackEvaluationI, PostfixMathCommandI
- Direct Known Subclasses:
- MAssign, XAssign
public class Assign
- extends PostfixMathCommand
- implements CallbackEvaluationI
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 function which implements the LValueI can appear on the left hand side of the equation.
- Author:
- Rich Morris
Created on 18-Nov-2003
|
Method Summary |
Object |
evaluate(Node node,
EvaluatorI pv)
For assignment set the value of the variable on the lhs to value returned by evaluating the righthand side. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Assign
public Assign()
evaluate
public Object evaluate(Node node,
EvaluatorI pv)
throws ParseException
- For assignment set the value of the variable on the lhs to value returned by evaluating the righthand side.
- Specified by:
evaluate in interface CallbackEvaluationI
- Parameters:
node - The current nodepv - The visitor, can be used evaluate the children
- Returns:
- the value after evaluation
- Throws:
ParseException
Copyright © 2014. All rights reserved.