Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.singularsys.jep
Interface NumberFactory

All Superinterfaces:
  JepComponent, java.io.Serializable

All Known Implementing Classes:
  BigDecNumberFactory, DoubleNumberFactory

    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
`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.
`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.

Methods inherited from interface com.singularsys.jep.JepComponent
`getLightWeightInstance, init`

Method Detail

### createNumber

    java.lang.Object createNumber(java.lang.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

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

  Creates a number object with given double value.

  Throws:
    `ParseException`

### createNumber

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

  Create a number object with given int value

  Throws:
    `ParseException`

### createNumber

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

  Create a number object with given short value

  Throws:
    `ParseException`

### createNumber

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

  Create a number object with given long value

  Throws:
    `ParseException`

### createNumber

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

  Create a number object with given float value

  Throws:
    `ParseException`

### createNumber

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

  Create a number object with given boolean value

  Throws:
    `ParseException`

### createNumber

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

  Creates a number object from a class implementing Number, May actually just return the class.

  Throws:
    `ParseException`

### createNumber

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

  Creates a number from a given complex value.

  Throws:
    `ParseException`

### getZero

    java.lang.Object getZero()

  Return an object representing ZERO the additive identity.

### getOne

    java.lang.Object getOne()

  Return an object representing ONE the multiplicative identity.

### getMinusOne

    java.lang.Object getMinusOne()

  Return an object representing ZERO-ONE.

### getTwo

    java.lang.Object getTwo()

  Return an object representing ONE+ONE.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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