public interface NumberValue extends Value
IntegerValue
and FloatValue
interfaces. To extract primitive type values, call toXXX methods, which may lose some information by rounding or truncation.IntegerValue
,
FloatValue
Modifier and Type | Method and Description |
---|---|
java.math.BigInteger |
toBigInteger()
Represent this value as a BigInteger, which may involve rounding or truncation of the original value.
|
byte |
toByte()
Represent this value as a byte value, which may involve rounding or truncation of the original value.
|
double |
toDouble()
Represent this value as a 64-bit double value, which may involve rounding or truncation of the original value.
|
float |
toFloat()
Represent this value as a 32-bit float value, which may involve rounding or truncation of the original value.
|
int |
toInt()
Represent this value as an int value, which may involve rounding or truncation of the original value.
|
long |
toLong()
Represent this value as a long value, which may involve rounding or truncation of the original value.
|
short |
toShort()
Represent this value as a short value, which may involve rounding or truncation of the original value.
|
asArrayValue, asBinaryValue, asBooleanValue, asExtensionValue, asFloatValue, asIntegerValue, asMapValue, asNilValue, asNumberValue, asRawValue, asStringValue, equals, getValueType, immutableValue, isArrayValue, isBinaryValue, isBooleanValue, isExtensionValue, isFloatValue, isIntegerValue, isMapValue, isNilValue, isNumberValue, isRawValue, isStringValue, toJson, writeTo
byte toByte()
short toShort()
int toInt()
long toLong()
java.math.BigInteger toBigInteger()
float toFloat()
double toDouble()