-
- All Implemented Interfaces:
-
com.batch.android.msgpack.value.Value
public interface NumberValue implements Value
Base interface of IntegerValue and FloatValue interfaces. To extract primitive type values, call toXXX methods, which may lose some information by rounding or truncation.
-
-
Method Summary
Modifier and Type Method Description abstract bytetoByte()Represent this value as a byte value, which may involve rounding or truncation of the original value.the value. abstract shorttoShort()Represent this value as a short value, which may involve rounding or truncation of the original value. abstract inttoInt()Represent this value as an int value, which may involve rounding or truncation of the original value.value. abstract longtoLong()Represent this value as a long value, which may involve rounding or truncation of the original value. abstract BigIntegertoBigInteger()Represent this value as a BigInteger, which may involve rounding or truncation of the original value. abstract floattoFloat()Represent this value as a 32-bit float value, which may involve rounding or truncation of the original value. abstract doubletoDouble()Represent this value as a 64-bit double value, which may involve rounding or truncation of the original value. -
Methods inherited from class com.batch.android.msgpack.value.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 -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
toByte
abstract byte toByte()
Represent this value as a byte value, which may involve rounding or truncation of the original value.the value.
-
toShort
abstract short toShort()
Represent this value as a short value, which may involve rounding or truncation of the original value.
-
toInt
abstract int toInt()
Represent this value as an int value, which may involve rounding or truncation of the original value.value.
-
toLong
abstract long toLong()
Represent this value as a long value, which may involve rounding or truncation of the original value.
-
toBigInteger
abstract BigInteger toBigInteger()
Represent this value as a BigInteger, which may involve rounding or truncation of the original value.
-
toFloat
abstract float toFloat()
Represent this value as a 32-bit float value, which may involve rounding or truncation of the original value.
-
toDouble
abstract double toDouble()
Represent this value as a 64-bit double value, which may involve rounding or truncation of the original value.
-
-
-
-