Package com.singularsys.jep

# Class OperatorTable2

java.lang.Object
com.singularsys.jep.EmptyOperatorTable
com.singularsys.jep.OperatorTable2

All Implemented Interfaces:
  `JepComponent`, `OperatorTableI`, `Serializable`

Direct Known Subclasses:
  `NullWrappedOperatorTable`, `StandardOperatorTable2`

public class OperatorTable2 extends EmptyOperatorTable
The basic set of operators provided as standard by Jep. Provides the logic but does not specify the actual implementations which is done by `StandardOperatorTable2`

Author:
  Richard Morris
See Also:
  - Serialized Form

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static enum`
  `OperatorTable2.BasicOperators`
  The basic arithmetic comparative and logical operators
  `static enum`
  `OperatorTable2.PsudoOperators`
  Operators which do not correspond to
  `static enum`
  `OperatorTable2.SpecialOperators`
  Special purpose operators

  ## Nested classes/interfaces inherited from class com.singularsys.jep.EmptyOperatorTable

  `EmptyOperatorTable.OperatorKey`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  ``
  `OperatorTable2()`
  ``
  `OperatorTable2(OperatorTable2 oldTable)`
  Decorator constructor.
  `protected`
  `OperatorTable2(Map<EmptyOperatorTable.OperatorKey,Operator> oldMap)`
  Constructor with pre-specified table of operators

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Operator`
  `getAdd()`
  Returns the operator used for addition.
  `Operator`
  `getAnd()`
  Gets the operator used for logical AND
  `Operator`
  `getAssign()`
  Gets the operator used for assignment
  `Operator`
  `getCross()`
  Gets the operator used for 3D cross product
  `Operator`
  `getDivide()`
  Gets the operator used for division
  `Operator`
  `getDot()`
  Gets the operator used for the dot product
  `Operator`
  `getEle()`
  Gets the operator used for getting and setting elements of a list
  `Operator`
  `getEQ()`
  Gets the operator used for equals
  `Operator`
  `getGE()`
  Gets the operator used for greater than or equals to
  `Operator`
  `getGT()`
  Gets the operator used for greater-than
  `Operator`
  `getLE()`
  Gets the operator used for less-than or equals to
  `Operator`
  `getList()`
  Gets the operator used for creation of lists `[1,2,3]`
  `Operator`
  `getLT()`
  Gets the operator used for less-than
  `Operator`
  `getMod()`
  Gets the operator used for modulus
  `Operator`
  `getMultiply()`
  Gets the operator used for multiplication
  `Operator`
  `getNE()`
  Gets the operator used for not equals
  `Operator`
  `getNop()`
  Gets the no-op operator
  `Operator`
  `getNot()`
  Gets the operator used for logical NOT
  `Operator`
  `getOr()`
  Gets the operator used for logical OR
  `Operator`
  `getPower()`
  Gets the operator used for powers
  `Operator`
  `getRange()`
  Gets the operator used for specifying a range
  `Operator`
  `getSubtract()`
  Gets the operator used for subtraction
  `Operator`
  `getUDivide()`
  unary division i.e. 1/x or x^(-1) *
  `Operator`
  `getUMinus()`
  Gets the operator used for unitary minus `-x`
  `Operator`
  `getUPlus()`
  Gets the operator used for unary addition `+x`
  `OperatorTableI`
  `shallowCopy()`
  Create a new version of this OperatorTable.

  ### Methods inherited from class com.singularsys.jep.EmptyOperatorTable

  `addOperator, addOperator, addOperator, appendOperator, appendOperator, entrySet, getAllOperatorsByName, getKey, getKeys, getLightWeightInstance, getNumOps, getOperator, getOperatorByName, getOperatorMap, getOperators, getOperatorsByName, getOperatorsBySymbol, init, insertOperator, insertOperator, keySet, removeOperator, removeOperator, replaceOperator, replaceOperator, setBinaryInverseOp, setDistributiveOver, setGroupOperatorRelations, setGroupOperatorRelations, setInverseOp, setPrecedenceTable, setRootOp, setStandardOperatorRelations, threadSafeMapCopy, toString`

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

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

- ## Constructor Details

  - ### OperatorTable2

    public OperatorTable2()

  - ### OperatorTable2

    public OperatorTable2(OperatorTable2 oldTable)
    Decorator constructor. The new class will share the same internal table as its argument.
    Parameters:
      `oldTable` -

  - ### OperatorTable2

    protected OperatorTable2(Map<EmptyOperatorTable.OperatorKey,Operator> oldMap)
    Constructor with pre-specified table of operators
    Parameters:
      `oldMap` - map with existing set of functions
    Since:
      4.0

- ## Method Details

  - ### getNop

    public Operator getNop()
    Description copied from interface: `OperatorTableI`
    Gets the no-op operator
    Specified by:
      `getNop` in interface `OperatorTableI`
    Overrides:
      `getNop` in class `EmptyOperatorTable`

  - ### getAdd

    public Operator getAdd()
    Description copied from class: `EmptyOperatorTable`
    Returns the operator used for addition.
    Specified by:
      `getAdd` in interface `OperatorTableI`
    Overrides:
      `getAdd` in class `EmptyOperatorTable`

  - ### getSubtract

    public Operator getSubtract()
    Description copied from interface: `OperatorTableI`
    Gets the operator used for subtraction
    Specified by:
      `getSubtract` in interface `OperatorTableI`
    Overrides:
      `getSubtract` in class `EmptyOperatorTable`

  - ### getUMinus

    public Operator getUMinus()
    Description copied from interface: `OperatorTableI`
    Gets the operator used for unitary minus `-x`
    Specified by:
      `getUMinus` in interface `OperatorTableI`
    Overrides:
      `getUMinus` in class `EmptyOperatorTable`

  - ### getUPlus

    public Operator getUPlus()
    Description copied from interface: `OperatorTableI`
    Gets the operator used for unary addition `+x`
    Specified by:
      `getUPlus` in interface `OperatorTableI`
    Overrides:
      `getUPlus` in class `EmptyOperatorTable`

  - ### getMultiply

    public Operator getMultiply()
    Description copied from interface: `OperatorTableI`
    Gets the operator used for multiplication
    Specified by:
      `getMultiply` in interface `OperatorTableI`
    Overrides:
      `getMultiply` in class `EmptyOperatorTable`

  - ### getDivide

    public Operator getDivide()
    Description copied from interface: `OperatorTableI`
    Gets the operator used for division
    Specified by:
      `getDivide` in interface `OperatorTableI`
    Overrides:
      `getDivide` in class `EmptyOperatorTable`

  - ### getMod

    public Operator getMod()
    Description copied from interface: `OperatorTableI`
    Gets the operator used for modulus
    Specified by:
      `getMod` in interface `OperatorTableI`
    Overrides:
      `getMod` in class `EmptyOperatorTable`

  - ### getUDivide

    public Operator getUDivide()
    unary division i.e. 1/x or x^(-1) *
    Specified by:
      `getUDivide` in interface `OperatorTableI`
    Overrides:
      `getUDivide` in class `EmptyOperatorTable`

  - ### getPower

    public Operator getPower()
    Description copied from interface: `OperatorTableI`
    Gets the operator used for powers
    Specified by:
      `getPower` in interface `OperatorTableI`
    Overrides:
      `getPower` in class `EmptyOperatorTable`

  - ### getGT

    public Operator getGT()
    Description copied from interface: `OperatorTableI`
    Gets the operator used for greater-than
    Specified by:
      `getGT` in interface `OperatorTableI`
    Overrides:
      `getGT` in class `EmptyOperatorTable`

  - ### getLT

    public Operator getLT()
    Description copied from interface: `OperatorTableI`
    Gets the operator used for less-than
    Specified by:
      `getLT` in interface `OperatorTableI`
    Overrides:
      `getLT` in class `EmptyOperatorTable`

  - ### getEQ

    public Operator getEQ()
    Description copied from interface: `OperatorTableI`
    Gets the operator used for equals
    Specified by:
      `getEQ` in interface `OperatorTableI`
    Overrides:
      `getEQ` in class `EmptyOperatorTable`

  - ### getLE

    public Operator getLE()
    Description copied from interface: `OperatorTableI`
    Gets the operator used for less-than or equals to
    Specified by:
      `getLE` in interface `OperatorTableI`
    Overrides:
      `getLE` in class `EmptyOperatorTable`

  - ### getGE

    public Operator getGE()
    Description copied from interface: `OperatorTableI`
    Gets the operator used for greater than or equals to
    Specified by:
      `getGE` in interface `OperatorTableI`
    Overrides:
      `getGE` in class `EmptyOperatorTable`

  - ### getNE

    public Operator getNE()
    Description copied from interface: `OperatorTableI`
    Gets the operator used for not equals
    Specified by:
      `getNE` in interface `OperatorTableI`
    Overrides:
      `getNE` in class `EmptyOperatorTable`

  - ### getAnd

    public Operator getAnd()
    Description copied from interface: `OperatorTableI`
    Gets the operator used for logical AND
    Specified by:
      `getAnd` in interface `OperatorTableI`
    Overrides:
      `getAnd` in class `EmptyOperatorTable`

  - ### getOr

    public Operator getOr()
    Description copied from interface: `OperatorTableI`
    Gets the operator used for logical OR
    Specified by:
      `getOr` in interface `OperatorTableI`
    Overrides:
      `getOr` in class `EmptyOperatorTable`

  - ### getNot

    public Operator getNot()
    Description copied from interface: `OperatorTableI`
    Gets the operator used for logical NOT
    Specified by:
      `getNot` in interface `OperatorTableI`
    Overrides:
      `getNot` in class `EmptyOperatorTable`

  - ### getAssign

    public Operator getAssign()
    Description copied from interface: `OperatorTableI`
    Gets the operator used for assignment
    Specified by:
      `getAssign` in interface `OperatorTableI`
    Overrides:
      `getAssign` in class `EmptyOperatorTable`

  - ### getDot

    public Operator getDot()
    Description copied from interface: `OperatorTableI`
    Gets the operator used for the dot product
    Specified by:
      `getDot` in interface `OperatorTableI`
    Overrides:
      `getDot` in class `EmptyOperatorTable`

  - ### getCross

    public Operator getCross()
    Description copied from interface: `OperatorTableI`
    Gets the operator used for 3D cross product
    Specified by:
      `getCross` in interface `OperatorTableI`
    Overrides:
      `getCross` in class `EmptyOperatorTable`

  - ### getList

    public Operator getList()
    Description copied from interface: `OperatorTableI`
    Gets the operator used for creation of lists `[1,2,3]`
    Specified by:
      `getList` in interface `OperatorTableI`
    Overrides:
      `getList` in class `EmptyOperatorTable`

  - ### getEle

    public Operator getEle()
    Description copied from interface: `OperatorTableI`
    Gets the operator used for getting and setting elements of a list
    Specified by:
      `getEle` in interface `OperatorTableI`
    Overrides:
      `getEle` in class `EmptyOperatorTable`

  - ### getRange

    public Operator getRange()
    Description copied from interface: `OperatorTableI`
    Gets the operator used for specifying a range
    Specified by:
      `getRange` in interface `OperatorTableI`
    Overrides:
      `getRange` in class `EmptyOperatorTable`

  - ### shallowCopy

    public OperatorTableI shallowCopy()
    Description copied from class: `EmptyOperatorTable`
    Create a new version of this OperatorTable. Operators are copied into new table. However, Operators whose pfmc implement JepComponent are duplicated. This means the table could be used in a separate thread without problem. Subclasses should override with method to return a table of the correct type, a typical implementation would be

        @Override
        public OperatorTableI shallowCopy() {
            Map<OperatorKey, Operator> map = this.threadSafeMapCopy();
            return new MyOperatorTable(map);
        }

    using the `EmptyOperatorTable.threadSafeMapCopy()` method to return a copy of the map of operators and a constructor taking this map which uses the `EmptyOperatorTable(Map)` constructor.
    Specified by:
      `shallowCopy` in interface `OperatorTableI`
    Overrides:
      `shallowCopy` in class `EmptyOperatorTable`
    Returns:
      a new Table