Package com.singularsys.jep.misc

# Class ExtendedOperatorSet

java.lang.Object
com.singularsys.jep.EmptyOperatorTable
com.singularsys.jep.OperatorTable2
com.singularsys.jep.standard.StandardOperatorTable2
com.singularsys.jep.misc.ExtendedOperatorSet

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

public class ExtendedOperatorSet extends StandardOperatorTable2
An example of an OperatorSet which adds suffix operators: n! (factorial) and n% (percentage) and since Jep 4.1 operators using Unicode superscripts like `x²` and `x³`.

The symbols used for the operators are defined in the properties file, if missing the operator will not be set.

Since 3.5 the ternary conditional has been removed as this is already part of the JavaOperatorSet. The Factorial function has been moved from an inner class to its own class `Factorial`.

See Also:
  - Serialized Form

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static enum`
  `ExtendedOperatorSet.ExtendedOperators`
  Keys for the new operators.

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

  `OperatorTable2.BasicOperators, OperatorTable2.PsudoOperators, OperatorTable2.SpecialOperators`

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

  `EmptyOperatorTable.OperatorKey`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  ``
  `ExtendedOperatorSet()`
  ``
  `ExtendedOperatorSet(OperatorTable2 oldTable)`
  `protected`
  `ExtendedOperatorSet(Map<EmptyOperatorTable.OperatorKey,Operator> map)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `setExtendedPfmcs()`
  `OperatorTableI`
  `shallowCopy()`
  Create a new version of this OperatorTable.

  ### Methods inherited from class com.singularsys.jep.standard.StandardOperatorTable2

  `setBasicPfmcs, setPsudoPfmcs, setSpecialPfmcs`

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

  `getAdd, getAnd, getAssign, getCross, getDivide, getDot, getEle, getEQ, getGE, getGT, getLE, getList, getLT, getMod, getMultiply, getNE, getNop, getNot, getOr, getPower, getRange, getSubtract, getUDivide, getUMinus, getUPlus`

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

  - ### ExtendedOperatorSet

    public ExtendedOperatorSet()

  - ### ExtendedOperatorSet

    public ExtendedOperatorSet(OperatorTable2 oldTable)
    Parameters:
      `oldTable` -

  - ### ExtendedOperatorSet

    protected ExtendedOperatorSet(Map<EmptyOperatorTable.OperatorKey,Operator> map)

- ## Method Details

  - ### setExtendedPfmcs

    protected void setExtendedPfmcs()

  - ### 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 `StandardOperatorTable2`
    Returns:
      a new Table