com.singularsys.jep.misc.javaops
Class OpEquals

java.lang.Object
  extended by com.singularsys.jep.functions.PostfixMathCommand
      extended by com.singularsys.jep.misc.javaops.OpEquals
All Implemented Interfaces:
CallbackEvaluationI, PostfixMathCommandI, java.io.Serializable

public class OpEquals
extends PostfixMathCommand
implements CallbackEvaluationI

See Also:
Serialized Form

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
OpEquals(PostfixMathCommandI fun)
           
 
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

OpEquals

public OpEquals(PostfixMathCommandI fun)
Method Detail

evaluate

public java.lang.Object evaluate(Node node,
                                 Evaluator pv)
                          throws EvaluationException
For assignment set the value of the variable on the lhs to value returned by evaluating the right-hand side.

Specified by:
evaluate in interface CallbackEvaluationI
Parameters:
node - The current node
pv - 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
See Also:
Evaluator

run

public void run(java.util.Stack<java.lang.Object> aStack)
         throws EvaluationException
Description copied from interface: PostfixMathCommandI
Run the function on the stack. Pops the arguments from the stack, and pushes the result on the top of the stack.

Specified by:
run in interface PostfixMathCommandI
Throws:
EvaluationException


Copyright © 2010 Singular Systems http://www.singularsys.com/jep