Package com.singularsys.jep

# Interface NumberFactory

All Superinterfaces:
  `JepComponent`, `Serializable`

All Known Implementing Classes:
  `BigDecNumberFactory`, `DoubleNumberFactory`, `StrictDoubleNumberFactory`

public interface NumberFactory extends JepComponent
This interface can be implemented to create numbers of any object type. By implementing this interface and calling the setNumberFactory() method of the Jep class, the constants in an expression will be created with that class.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Object`
  `createNumber(boolean value)`
  Create a number object with given boolean value
  `Object`
  `createNumber(double value)`
  Creates a number object with given double value.
  `Object`
  `createNumber(float value)`
  Create a number object with given float value
  `Object`
  `createNumber(int value)`
  Create a number object with given int value
  `Object`
  `createNumber(long value)`
  Create a number object with given long value
  `Object`
  `createNumber(short value)`
  Create a number object with given short value
  `Object`
  `createNumber(Complex value)`
  Creates a number from a given complex value.
  `Object`
  `createNumber(Number value)`
  Creates a number object from a class implementing Number, May actually just return the class.
  `Object`
  `createNumber(String value)`
  Creates a number object and initializes its value.
  `Object`
  `getMinusOne()`
  Return an object representing ZERO-ONE.
  `Object`
  `getOne()`
  Return an object representing ONE the multiplicative identity.
  `Object`
  `getTwo()`
  Return an object representing ONE+ONE.
  `Object`
  `getZero()`
  Return an object representing ZERO the additive identity.

  ### Methods inherited from interface com.singularsys.jep.JepComponent

  `getLightWeightInstance, init`

- ## Method Details

  - ### createNumber

    Object createNumber(String value) throws ParseException
    Creates a number object and initializes its value.
    Parameters:
      `value` - The initial value of the number as a string.
    Throws:
      `ParseException`

  - ### createNumber

    Object createNumber(double value) throws ParseException
    Creates a number object with given double value.
    Throws:
      `ParseException`

  - ### createNumber

    Object createNumber(int value) throws ParseException
    Create a number object with given int value
    Throws:
      `ParseException`

  - ### createNumber

    Object createNumber(short value) throws ParseException
    Create a number object with given short value
    Throws:
      `ParseException`

  - ### createNumber

    Object createNumber(long value) throws ParseException
    Create a number object with given long value
    Throws:
      `ParseException`

  - ### createNumber

    Object createNumber(float value) throws ParseException
    Create a number object with given float value
    Throws:
      `ParseException`

  - ### createNumber

    Object createNumber(boolean value) throws ParseException
    Create a number object with given boolean value
    Throws:
      `ParseException`

  - ### createNumber

    Object createNumber(Number value) throws ParseException
    Creates a number object from a class implementing Number, May actually just return the class.
    Throws:
      `ParseException`

  - ### createNumber

    Object createNumber(Complex value) throws ParseException
    Creates a number from a given complex value.
    Throws:
      `ParseException`

  - ### getZero

    Object getZero()
    Return an object representing ZERO the additive identity.

  - ### getOne

    Object getOne()
    Return an object representing ONE the multiplicative identity.

  - ### getMinusOne

    Object getMinusOne()
    Return an object representing ZERO-ONE.

  - ### getTwo

    Object getTwo()
    Return an object representing ONE+ONE.