Package com.singularsys.jep.bigdecimal

# Class BigDecOperatorTable

java.lang.Object
com.singularsys.jep.EmptyOperatorTable
com.singularsys.jep.OperatorTable2
com.singularsys.jep.standard.StandardOperatorTable2
com.singularsys.jep.bigdecimal.BigDecOperatorTable

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

public class BigDecOperatorTable extends StandardOperatorTable2 implements FixedPrecisionFunctionI
A set of operators for using BigDecimal numbers

See Also:
  - Serialized Form

- ## Nested Class Summary

  ## 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
  ``
  `BigDecOperatorTable(OperatorTable2 oldTable, MathContext mc)`
  ``
  `BigDecOperatorTable(OperatorTable2 oldTable, MathContext mc, int scale)`
  ``
  `BigDecOperatorTable(MathContext mc)`
  ``
  `BigDecOperatorTable(MathContext mc, boolean allowStrings)`
  Create an operator table specifying the math context and whether string operations can be used
  ``
  `BigDecOperatorTable(MathContext mc, int scale)`
  ``
  `BigDecOperatorTable(MathContext mc, int scale, boolean allowStrings)`
  Create an operator table specifying the math context and whether string operations can be used
  `protected`
  `BigDecOperatorTable(MathContext mc, int scale, Map<EmptyOperatorTable.OperatorKey,Operator> map)`
  `protected`
  `BigDecOperatorTable(MathContext mc, Map<EmptyOperatorTable.OperatorKey,Operator> map)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getDecimalPlaces()`
  Gets the number of decimal places used.
  `MathContext`
  `getMathContext()`
  `void`
  `setAllowStrings(boolean allowStrings)`
  Sets the allowStrings flag of the operators.
  `protected void`
  `setBasicPfmcs()`
  Sets the standard set of pfmc's for basic operators.
  `protected void`
  `setBDPfmcs()`
  `protected void`
  `setBDPfmcs(int scale)`
  `void`
  `setDecimalPlaces(int scale)`
  Set the number of decimal digits used for fixed-point numbers
  `void`
  `setMathContext(MathContext mc)`
  `protected void`
  `setSpecialPfmcs()`
  Sets the standard set of pfmcs for special operator: assignment, dot product, cross product, the list operator and the element-of operator.
  `OperatorTableI`
  `shallowCopy()`
  Create a new version of this OperatorTable.

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

  `setPsudoPfmcs`

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

  - ### BigDecOperatorTable

    public BigDecOperatorTable(MathContext mc)

  - ### BigDecOperatorTable

    public BigDecOperatorTable(OperatorTable2 oldTable, MathContext mc)
    Parameters:
      `oldTable` -

  - ### BigDecOperatorTable

    public BigDecOperatorTable(MathContext mc, boolean allowStrings)
    Create an operator table specifying the math context and whether string operations can be used
    Parameters:
      `mc` -
      `allowStrings` - whether strings can be used.
    Since:
      3.4.0

  - ### BigDecOperatorTable

    protected BigDecOperatorTable(MathContext mc, Map<EmptyOperatorTable.OperatorKey,Operator> map)

  - ### BigDecOperatorTable

    public BigDecOperatorTable(MathContext mc, int scale)

  - ### BigDecOperatorTable

    public BigDecOperatorTable(OperatorTable2 oldTable, MathContext mc, int scale)
    Parameters:
      `oldTable` -

  - ### BigDecOperatorTable

    public BigDecOperatorTable(MathContext mc, int scale, boolean allowStrings)
    Create an operator table specifying the math context and whether string operations can be used
    Parameters:
      `mc` -
      `allowStrings` - whether strings can be used.
    Since:
      3.4.0

  - ### BigDecOperatorTable

    protected BigDecOperatorTable(MathContext mc, int scale, Map<EmptyOperatorTable.OperatorKey,Operator> map)

- ## Method Details

  - ### setBasicPfmcs

    protected void setBasicPfmcs()
    Description copied from class: `StandardOperatorTable2`
    Sets the standard set of pfmc's for basic operators. This method is called by the constructor and subclasses can override this method to change or prevent building of these pfmcs.
    Overrides:
      `setBasicPfmcs` in class `StandardOperatorTable2`
    See Also:
      - `OperatorTable2.BasicOperators`

  - ### setSpecialPfmcs

    protected void setSpecialPfmcs()
    Description copied from class: `StandardOperatorTable2`
    Sets the standard set of pfmcs for special operator: assignment, dot product, cross product, the list operator and the element-of operator. This method is called by the constructor and subclasses can override this method to change or prevent building of these pfmcs.
    Overrides:
      `setSpecialPfmcs` in class `StandardOperatorTable2`
    See Also:
      - `OperatorTable2.SpecialOperators`

  - ### setBDPfmcs

    protected void setBDPfmcs()

  - ### setBDPfmcs

    protected void setBDPfmcs(int scale)

  - ### getMathContext

    public MathContext getMathContext()

  - ### setMathContext

    public void setMathContext(MathContext mc)

  - ### setAllowStrings

    public void setAllowStrings(boolean allowStrings)
    Sets the allowStrings flag of the operators.
    Parameters:
      `allowStrings` -
    Since:
      3.4.0

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

  - ### setDecimalPlaces

    public void setDecimalPlaces(int scale)
    Set the number of decimal digits used for fixed-point numbers
    Specified by:
      `setDecimalPlaces` in interface `FixedPrecisionFunctionI`
    Parameters:
      `scale` -

  - ### getDecimalPlaces

    public int getDecimalPlaces()
    Description copied from interface: `FixedPrecisionFunctionI`
    Gets the number of decimal places used.
    Specified by:
      `getDecimalPlaces` in interface `FixedPrecisionFunctionI`
    Returns:
      either zero, a positive number or -1 for floating-point formats