private abstract class Variable.AbstractNumberValueAccessor extends Variable.AbstractValueAccessor implements NumberValue
| Modifier | Constructor and Description |
|---|---|
private |
AbstractNumberValueAccessor() |
| Modifier and Type | Method and Description |
|---|---|
NumberValue |
asNumberValue()
Returns the value as
NumberValue. |
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, asRawValue, asStringValue, asTimestampValue, equals, hashCode, isArrayValue, isBinaryValue, isBooleanValue, isExtensionValue, isFloatValue, isIntegerValue, isMapValue, isNilValue, isNumberValue, isRawValue, isStringValue, isTimestampValue, toJson, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitasArrayValue, asBinaryValue, asBooleanValue, asExtensionValue, asFloatValue, asIntegerValue, asMapValue, asNilValue, asRawValue, asStringValue, asTimestampValue, equals, getValueType, immutableValue, isArrayValue, isBinaryValue, isBooleanValue, isExtensionValue, isFloatValue, isIntegerValue, isMapValue, isNilValue, isNumberValue, isRawValue, isStringValue, isTimestampValue, toJson, writeTopublic NumberValue asNumberValue()
ValueNumberValue. Otherwise throws MessageTypeCastException.
Note that you can't use instanceof or cast ((NumberValue) thisValue) to check type of a value because type of a mutable value is variable.asNumberValue in interface ValueasNumberValue in class Variable.AbstractValueAccessorpublic byte toByte()
NumberValuetoByte in interface NumberValuepublic short toShort()
NumberValuetoShort in interface NumberValuepublic int toInt()
NumberValuetoInt in interface NumberValuepublic long toLong()
NumberValuetoLong in interface NumberValuepublic java.math.BigInteger toBigInteger()
NumberValuetoBigInteger in interface NumberValuepublic float toFloat()
NumberValuetoFloat in interface NumberValuepublic double toDouble()
NumberValuetoDouble in interface NumberValue