|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface NumericType
Immutable class representing the type to be used by the numeric computations of generated engines.
This interface is an API only. Do not implement it yourself.
| Nested Class Summary | |
|---|---|
static interface |
NumericType.Factory
Factory interface for ImplementationLocator.getInstance(Class). |
| Field Summary | |
|---|---|
static int |
UNDEFINED_SCALE
For BigDecimal types, indicates that no explicit scaling should be performed by the engine. |
static int |
UNLIMITED_FRACTIONAL_DIGITS
Indicates no final rounding due to number formats with a maximum number of fractional digits. |
| Method Summary | |
|---|---|
java.lang.Number |
getOne()
Returns the number 1. |
java.lang.Number |
getZero()
Returns the number 0. |
java.math.MathContext |
mathContext()
Returns the MathContext to use, or else null. |
int |
roundingMode()
Returns the rounding mode. |
int |
scale()
Returns the fixed scale, or else UNDEFINED_SCALE. |
java.lang.Number |
valueOf(java.lang.Number _value)
Converts a number to this type. |
java.lang.Number |
valueOf(java.lang.String _value)
Parses a string into a value using the default environment config. |
java.lang.Number |
valueOf(java.lang.String _value,
Computation.Config _config)
Parses a string into a value using the given environment config. |
java.lang.String |
valueToConciseString(java.lang.Number _value)
Returns the value as a string with no superfluous leading or trailing zeroes and decimal point using the default environment config. |
java.lang.String |
valueToConciseString(java.lang.Number _value,
Computation.Config _config)
Returns the value as a string with no superfluous leading or trailing zeroes and decimal point using the given environment config. |
java.lang.String |
valueToString(java.lang.Number _value)
Returns the value as a string in its canonical representation using the default environment config. |
java.lang.String |
valueToString(java.lang.Number _value,
Computation.Config _config)
Returns the value as a string in its canonical representation using the given environment config. |
java.lang.Class |
valueType()
Returns the Java class of the base type. |
| Field Detail |
|---|
static final int UNDEFINED_SCALE
static final int UNLIMITED_FRACTIONAL_DIGITS
| Method Detail |
|---|
java.lang.Class valueType()
java.math.MathContext mathContext()
null.
int scale()
UNDEFINED_SCALE.
int roundingMode()
java.lang.Number getZero()
java.lang.Number getOne()
java.lang.Number valueOf(java.lang.Number _value)
valueType()
java.lang.Number valueOf(java.lang.String _value)
throws java.text.ParseException
getZero()).
java.text.ParseExceptionvalueOf(String, Computation.Config),
valueType()
java.lang.Number valueOf(java.lang.String _value,
Computation.Config _config)
throws java.text.ParseException
getZero()).
_config - determines formatting options; must not be null.
java.text.ParseExceptionvalueType()java.lang.String valueToString(java.lang.Number _value)
_value - must be an instance of the corresponding (boxed) Java number type, or null.valueToString(Number, Computation.Config),
valueType()
java.lang.String valueToString(java.lang.Number _value,
Computation.Config _config)
_value - must be an instance of the corresponding (boxed) Java number type, or null._config - determines formatting options; must not be null.valueType()java.lang.String valueToConciseString(java.lang.Number _value)
_value - must be an instance of the corresponding (boxed) Java number type, or null.valueToConciseString(Number, Computation.Config),
valueType()
java.lang.String valueToConciseString(java.lang.Number _value,
Computation.Config _config)
_value - must be an instance of the corresponding (boxed) Java number type, or null._config - determines formatting options; must not be null.valueType()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||