Package com.singularsys.jep.misc.javaops

# Class OpEquals

java.lang.Object
com.singularsys.jep.functions.PostfixMathCommand
com.singularsys.jep.misc.javaops.OpEquals

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

public class OpEquals extends PostfixMathCommand implements CallbackEvaluationI
Function implementing compound assignment operators such as `+=`, `*=` etc. The operator is specified by the `fun` parameter in the constructor.

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

- ## 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.
  `String`
  `getDescription()`
  Return a description of the function from the properties file.
  `PostfixMathCommandI`
  `getRoot()`

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

  `asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, asType, checkNumberOfParameters, 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

  - ### OpEquals

    public OpEquals(PostfixMathCommandI fun)

- ## Method Details

  - ### getRoot

    public PostfixMathCommandI getRoot()

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

  - ### getDescription

    public String getDescription()
    Description copied from class: `PostfixMathCommand`
    Return a description of the function from the properties file. The property name is the class name followed by ".description". The property is found using the `JepMessages` class, which can be configured to add additional properties files. If `PostfixMathCommand.setDescription(String)` has been called, return the description set by that method instead.
    Specified by:
      `getDescription` in interface `PostfixMathCommandI`
    Overrides:
      `getDescription` in class `PostfixMathCommand`
    Returns:
      the description of the function