com.singularsys.jep.bigdecimal

## Class BigDecNumberFactory

- java.lang.Object
- - com.singularsys.jep.bigdecimal.BigDecNumberFactory

- All Implemented Interfaces:
    JepComponent, NumberFactory, java.io.Serializable

      public class BigDecNumberFactory
      extends java.lang.Object
      implements NumberFactory

  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.math.MathContext` | `mc`
    `static java.math.BigDecimal` | `MINUSONE`
    `static java.math.BigDecimal` | `TWO`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BigDecNumberFactory(java.math.MathContext mc)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `createNumber(boolean value)` Create a number object with given boolean value
    `java.lang.Object` | `createNumber(Complex value)` Creates a number from a given complex value.
    `java.lang.Object` | `createNumber(double value)` Creates a number object with given double value.
    `java.lang.Object` | `createNumber(float value)` Create a number object with given float value
    `java.lang.Object` | `createNumber(int value)` Create a number object with given int value
    `java.lang.Object` | `createNumber(long value)` Create a number object with given long value
    `java.lang.Object` | `createNumber(java.lang.Number value)` Creates a number object from a class implementing Number, May actually just return the class.
    `java.lang.Object` | `createNumber(short value)` Create a number object with given short value
    `java.lang.Object` | `createNumber(java.lang.String value)` Creates a number object and initializes its value.
    `JepComponent` | `getLightWeightInstance()` Gets a light-weight instance suitable for using in multiple threads.
    `java.math.MathContext` | `getMathContext()`
    `java.lang.Object` | `getMinusOne()` Return an object representing ZERO-ONE.
    `java.lang.Object` | `getOne()` Return an object representing ONE the multiplicative identity.
    `java.lang.Object` | `getTwo()` Return an object representing ONE+ONE.
    `java.lang.Object` | `getZero()` Return an object representing ZERO the additive identity.
    `void` | `init(Jep jep)` Initialize the component.
    `void` | `setMathContext(java.math.MathContext mc)`

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

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

- - ### Field Detail

    - #### TWO

          public static final java.math.BigDecimal TWO

    - #### MINUSONE

          public static final java.math.BigDecimal MINUSONE

    - #### mc

          protected java.math.MathContext mc

  - ### Constructor Detail

    - #### BigDecNumberFactory

          public BigDecNumberFactory(java.math.MathContext mc)

      Parameters:
        `mc` -

  - ### Method Detail

    - #### createNumber

          public java.lang.Object createNumber(java.lang.String value)
                                        throws ParseException

      Description copied from interface: `NumberFactory`
      Creates a number object and initializes its value.
      Specified by:
        `createNumber` in interface `NumberFactory`
      Parameters:
        `value` - The initial value of the number as a string.
      Throws:
        `ParseException`

    - #### createNumber

          public java.lang.Object createNumber(double value)
                                        throws ParseException

      Description copied from interface: `NumberFactory`
      Creates a number object with given double value.
      Specified by:
        `createNumber` in interface `NumberFactory`
      Throws:
        `ParseException`

    - #### createNumber

          public java.lang.Object createNumber(int value)
                                        throws ParseException

      Description copied from interface: `NumberFactory`
      Create a number object with given int value
      Specified by:
        `createNumber` in interface `NumberFactory`
      Throws:
        `ParseException`

    - #### createNumber

          public java.lang.Object createNumber(short value)
                                        throws ParseException

      Description copied from interface: `NumberFactory`
      Create a number object with given short value
      Specified by:
        `createNumber` in interface `NumberFactory`
      Throws:
        `ParseException`

    - #### createNumber

          public java.lang.Object createNumber(long value)
                                        throws ParseException

      Description copied from interface: `NumberFactory`
      Create a number object with given long value
      Specified by:
        `createNumber` in interface `NumberFactory`
      Throws:
        `ParseException`

    - #### createNumber

          public java.lang.Object createNumber(float value)
                                        throws ParseException

      Description copied from interface: `NumberFactory`
      Create a number object with given float value
      Specified by:
        `createNumber` in interface `NumberFactory`
      Throws:
        `ParseException`

    - #### createNumber

          public java.lang.Object createNumber(boolean value)
                                        throws ParseException

      Description copied from interface: `NumberFactory`
      Create a number object with given boolean value
      Specified by:
        `createNumber` in interface `NumberFactory`
      Throws:
        `ParseException`

    - #### createNumber

          public java.lang.Object createNumber(java.lang.Number value)
                                        throws ParseException

      Description copied from interface: `NumberFactory`
      Creates a number object from a class implementing Number, May actually just return the class.
      Specified by:
        `createNumber` in interface `NumberFactory`
      Throws:
        `ParseException`

    - #### createNumber

          public java.lang.Object createNumber(Complex value)
                                        throws ParseException

      Description copied from interface: `NumberFactory`
      Creates a number from a given complex value.
      Specified by:
        `createNumber` in interface `NumberFactory`
      Throws:
        `ParseException`

    - #### getMinusOne

          public java.lang.Object getMinusOne()

      Description copied from interface: `NumberFactory`
      Return an object representing ZERO-ONE.
      Specified by:
        `getMinusOne` in interface `NumberFactory`

    - #### getZero

          public java.lang.Object getZero()

      Description copied from interface: `NumberFactory`
      Return an object representing ZERO the additive identity.
      Specified by:
        `getZero` in interface `NumberFactory`

    - #### getOne

          public java.lang.Object getOne()

      Description copied from interface: `NumberFactory`
      Return an object representing ONE the multiplicative identity.
      Specified by:
        `getOne` in interface `NumberFactory`

    - #### getTwo

          public java.lang.Object getTwo()

      Description copied from interface: `NumberFactory`
      Return an object representing ONE+ONE.
      Specified by:
        `getTwo` in interface `NumberFactory`

    - #### init

          public void init(Jep jep)

      Description copied from interface: `JepComponent`
      Initialize the component. This methods is called whenever a component is added to Jep. Hence it allows components to keep track of the other components they may rely on.
      Specified by:
        `init` in interface `JepComponent`
      Parameters:
        `jep` - the current Jep instance

    - #### getMathContext

          public java.math.MathContext getMathContext()

    - #### setMathContext

          public void setMathContext(java.math.MathContext mc)

    - #### getLightWeightInstance

          public JepComponent getLightWeightInstance()

      Description copied from interface: `JepComponent`
      Gets a light-weight instance suitable for using in multiple threads.
      Specified by:
        `getLightWeightInstance` in interface `JepComponent`
      Returns:
        either an new instance, or 'this'.

Copyright © 2018 Singular Systems http://www.singularsys.com/jep