Package com.singularsys.jep.misc.functions

# Class AssignableList

java.lang.Object
com.singularsys.jep.functions.PostfixMathCommand
com.singularsys.jep.functions.List
com.singularsys.jep.misc.functions.AssignableList

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

public class AssignableList extends List implements LValueI
A list than can be assigned to `[x,y,z] = [1,2,3]`. Items in the left hand side list must be variables or functions implementing `LValueI`. This allow elements in a vector to be swapped `[v[2],v[1]]=v`.

This function can be used as a replacement for `List`

         Jep jep = new Jep(new StandardConfigurableParser());
         jep.getOperatorTable().getList().setPFMC(new AssignableList());
         Node n = jep.parse("[x,y] = [3,4]");
         Object res = jep.evaluate(n);

Since:
  Jep 4.1
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
  `AssignableList()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `set(Evaluator pv, Node node, Object value)`
  Performs appropriate action to set an LValue.

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

  `run`

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

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

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

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

- ## Constructor Details

  - ### AssignableList

    public AssignableList()

- ## Method Details

  - ### set

    public void set(Evaluator pv, Node node, Object value) throws EvaluationException
    Description copied from interface: `LValueI`
    Performs appropriate action to set an LValue.
    Specified by:
      `set` in interface `LValueI`
    Parameters:
      `pv` - a pointer to the evaluator. The pv.eval() method can be used to evaluate the children of the node.
      `node` - The top node for the LValue
      `value` - the value obtained by evaluating the right-hand side.
    Throws:
      `EvaluationException` - if the calculation cannot be performed