Package com.singularsys.jep.bigdecimal
Class BigDecNumberFactory
java.lang.Object
com.singularsys.jep.bigdecimal.BigDecNumberFactory
- All Implemented Interfaces:
JepComponent,NumberFactory,Serializable
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected MathContextstatic final BigDecimalstatic final BigDecimal -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateNumber(boolean value) Create a number object with given boolean valuecreateNumber(double value) Creates a number object with given double value.createNumber(float value) Create a number object with given float valuecreateNumber(int value) Create a number object with given int valuecreateNumber(long value) Create a number object with given long valuecreateNumber(short value) Create a number object with given short valuecreateNumber(Complex value) Creates a number from a given complex value.createNumber(Number value) Creates a number object from a class implementing Number, May actually just return the class.createNumber(String value) Creates a number object and initializes its value.Gets a light-weight instance suitable for using in multiple threads.Return an object representing ZERO-ONE.getOne()Return an object representing ONE the multiplicative identity.getTwo()Return an object representing ONE+ONE.getZero()Return an object representing ZERO the additive identity.voidInitialize the component.void
-
Field Details
-
TWO
-
MINUSONE
-
mc
-
-
Constructor Details
-
BigDecNumberFactory
- Parameters:
mc-
-
-
Method Details
-
createNumber
Description copied from interface:NumberFactoryCreates a number object and initializes its value.- Specified by:
createNumberin interfaceNumberFactory- Parameters:
value- The initial value of the number as a string.
-
createNumber
Description copied from interface:NumberFactoryCreates a number object with given double value.- Specified by:
createNumberin interfaceNumberFactory
-
createNumber
Description copied from interface:NumberFactoryCreate a number object with given int value- Specified by:
createNumberin interfaceNumberFactory
-
createNumber
Description copied from interface:NumberFactoryCreate a number object with given short value- Specified by:
createNumberin interfaceNumberFactory
-
createNumber
Description copied from interface:NumberFactoryCreate a number object with given long value- Specified by:
createNumberin interfaceNumberFactory
-
createNumber
Description copied from interface:NumberFactoryCreate a number object with given float value- Specified by:
createNumberin interfaceNumberFactory
-
createNumber
Description copied from interface:NumberFactoryCreate a number object with given boolean value- Specified by:
createNumberin interfaceNumberFactory
-
createNumber
Description copied from interface:NumberFactoryCreates a number object from a class implementing Number, May actually just return the class.- Specified by:
createNumberin interfaceNumberFactory
-
createNumber
Description copied from interface:NumberFactoryCreates a number from a given complex value.- Specified by:
createNumberin interfaceNumberFactory
-
getMinusOne
Description copied from interface:NumberFactoryReturn an object representing ZERO-ONE.- Specified by:
getMinusOnein interfaceNumberFactory
-
getZero
Description copied from interface:NumberFactoryReturn an object representing ZERO the additive identity.- Specified by:
getZeroin interfaceNumberFactory
-
getOne
Description copied from interface:NumberFactoryReturn an object representing ONE the multiplicative identity.- Specified by:
getOnein interfaceNumberFactory
-
getTwo
Description copied from interface:NumberFactoryReturn an object representing ONE+ONE.- Specified by:
getTwoin interfaceNumberFactory
-
init
Description copied from interface:JepComponentInitialize the component. This method 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:
initin interfaceJepComponent- Parameters:
jep- the current Jep instance
-
getMathContext
-
setMathContext
-
getLightWeightInstance
Description copied from interface:JepComponentGets a light-weight instance suitable for using in multiple threads.- Specified by:
getLightWeightInstancein interfaceJepComponent- Returns:
- either a new instance, null or 'this'.
-