Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.singularsys.jep.functions
Class Assign

    java.lang.Object
      com.singularsys.jep.functions.PostfixMathCommand
          com.singularsys.jep.functions.Assign

All Implemented Interfaces:
  CallbackEvaluationI, PostfixMathCommandI, java.io.Serializable

    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
See Also:
  Serialized Form

Field Summary

Fields inherited from class com.singularsys.jep.functions.PostfixMathCommand
`curNumberOfParameters, 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
`checkNumberOfParameters, checkStack, getNumberOfParameters, setCurNumberOfParameters`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Assign

    public Assign()

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
  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`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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