Package com.singularsys.jep.functions

# Class Assign

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

All Implemented Interfaces:
  `CallbackEvaluationI`, `PostfixMathCommandI`, `Serializable`

Direct Known Subclasses:
  `ThreadSafeAssign`

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 functions which implements `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, description, name, NaN, numberOfParameters`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Assign()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `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.

  ### Methods inherited from class com.singularsys.jep.functions.PostfixMathCommand

  `asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, asType, checkNumberOfParameters, getDescription, getDescription, getDescriptionWithType, getName, getNumberOfParameters, run, setCurNumberOfParameters, setDescription, setName, toString, toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### Assign

    public Assign()

- ## Method Details

  - ### evaluate

    public 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` - if the calculation cannot be performed
    See Also:
      - `Evaluator`