public interface NumberValue extends Value
Modifier and Type | Method and Description |
---|---|
java.math.BigInteger |
asBigInteger()
Convert this value into a BigInteger value.
|
byte |
asByte()
Convert this value into a byte value.
|
int |
asInt()
Convert this value into an int value.
|
long |
asLong()
Convert this value into a long value.
|
short |
asShort()
Convert this value into a short value.
|
boolean |
isValidByte()
Check whether this value is a valid byte value.
|
boolean |
isValidInt()
Check whether this value is a valid integer value.
|
boolean |
isValidLong()
Check whether this value is a valid long value.
|
boolean |
isValidShort()
Check whether this value is a valid short value.
|
boolean |
isWhole()
Returns true if this number has no decimal component
|
java.math.BigInteger |
toBigInteger()
Convert this value into a BigInteger
|
byte |
toByte()
Convert this value into a byte value.
|
double |
toDouble()
Convert this value into a double value
|
float |
toFloat()
Convert this value into a float value
|
int |
toInt()
Convert this value into an int value.
|
long |
toLong()
Convert this value into a long value.
|
short |
toShort()
Convert this value into a short value.
|
asArrayValue, asMapValue
accept, asBinary, asBoolean, asExtended, asFloat, asInteger, asNil, asNumber, asRaw, asString, getArrayCursor, getMapCursor, getValueType, isArray, isBinary, isBoolean, isExtended, isFloat, isInteger, isMap, isNil, isNumber, isRaw, isRef, isString, toValue, writeTo
boolean isValidByte()
Byte.MIN_VALUE
and Byte.MAX_VALUE
; otherwise returns falseboolean isValidShort()
Short.MIN_VALUE
and Short.MAX_VALUE
; otherwise returns falseboolean isValidInt()
Integer.MIN_VALUE
and Integer.MAX_VALUE
; otherwise returns falseboolean isValidLong()
Long.MIN_VALUE
and Long.MAX_VALUE
; otherwise returns falseboolean isWhole()
byte toByte()
short toShort()
int toInt()
long toLong()
java.math.BigInteger toBigInteger()
float toFloat()
double toDouble()
byte asByte() throws MessageOverflowException
MessageOverflowException
- when the value is not within the range of Byte.MIN_VALUE
and Byte.MAX_VALUE
;short asShort() throws MessageOverflowException
MessageOverflowException
- when the value is not within the range of Short.MIN_VALUE
and Short.MAX_VALUE
int asInt() throws MessageOverflowException
MessageOverflowException
- when the value is not within the range of Integer.MIN_VALUE
and Integer.MAX_VALUE
long asLong() throws MessageOverflowException
MessageOverflowException
- when the value is not within the range of Long.MIN_VALUE
and Long.MAX_VALUE
java.math.BigInteger asBigInteger() throws MessageOverflowException
MessageOverflowException