Class BigDecFunctionTable

  • All Implemented Interfaces:
    JepComponent, java.io.Serializable
    Direct Known Subclasses:
    BigDecimalFunctionTable

    public class BigDecFunctionTable
    extends FunctionTable
    A function table for BigDecimals. Has a MathContext field which can be used by functions.
    Version:
    Jep 3.5 Added min, max and various rounding functions.
    See Also:
    Serialized Form
    • Constructor Detail

      • BigDecFunctionTable

        public BigDecFunctionTable​(java.math.MathContext mc)
      • BigDecFunctionTable

        protected BigDecFunctionTable​(java.math.MathContext mc,
                                      java.util.Map<java.lang.String,​PostfixMathCommandI> tbl)
    • Method Detail

      • getMathContext

        public java.math.MathContext getMathContext()
      • setMathContext

        public void setMathContext​(java.math.MathContext mc)
      • shallowCopy

        public FunctionTable shallowCopy()
        Description copied from class: FunctionTable
        Returns a new shallow copy of this function table. Calls the FunctionTable.threadSafeMapCopy() method to ensure the table is safe to use a separate thread. All sub-classes should override this methods to create a function table of the matching type. A typical implementation would be
                  @Override
                  public FunctionTable shallowCopy() {
                      Map<String,PostfixMathCommandI> newMap = this.threadSafeMapCopy();
                return new myFunctionTable(newMap);
                  }
         
        using the FunctionTable.threadSafeMapCopy() method to return a copy of the map of operators and a constructor taking this map which uses the FunctionTable(Map) constructor.
        Overrides:
        shallowCopy in class FunctionTable
        Returns:
        a new shallow copy of this function table