-
- All Implemented Interfaces:
-
com.batch.android.msgpack.value.NumberValue,com.batch.android.msgpack.value.Value
public interface IntegerValue implements NumberValue
Representation of MessagePack's Integer type.
MessagePack's Integer type can represent from -263 to 264-1.
-
-
Method Summary
Modifier and Type Method Description abstract booleanisInByteRange()Returns true if the value is in the range of [-27 to 27-1]. abstract booleanisInShortRange()Returns true if the value is in the range of [-215 to 215-1] abstract booleanisInIntRange()Returns true if the value is in the range of [-231 to 231-1] abstract booleanisInLongRange()Returns true if the value is in the range of [-263 to 263-1] abstract MessageFormatmostSuccinctMessageFormat()Returns the most succinct MessageFormat type to represent this integer value. abstract byteasByte()Returns the value as a {@code byte}, otherwise throws an exception.abstract shortasShort()Returns the value as a {@code short}, otherwise throws an exception.abstract intasInt()Returns the value as an {@code int}, otherwise throws an exception.abstract longasLong()Returns the value as a {@code long}, otherwise throws an exception.abstract BigIntegerasBigInteger()Returns the value as a {@code BigInteger}.-
Methods inherited from class com.batch.android.msgpack.value.NumberValue
toBigInteger, toByte, toDouble, toFloat, toInt, toLong, toShort -
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
-
isInByteRange
abstract boolean isInByteRange()
Returns true if the value is in the range of [-27 to 27-1].
-
isInShortRange
abstract boolean isInShortRange()
Returns true if the value is in the range of [-215 to 215-1]
-
isInIntRange
abstract boolean isInIntRange()
Returns true if the value is in the range of [-231 to 231-1]
-
isInLongRange
abstract boolean isInLongRange()
Returns true if the value is in the range of [-263 to 263-1]
-
mostSuccinctMessageFormat
abstract MessageFormat mostSuccinctMessageFormat()
Returns the most succinct MessageFormat type to represent this integer value.
-
asByte
abstract byte asByte()
Returns the value as a
{@code byte}, otherwise throws an exception.
-
asShort
abstract short asShort()
Returns the value as a
{@code short}, otherwise throws an exception.
-
asInt
abstract int asInt()
Returns the value as an
{@code int}, otherwise throws an exception.
-
asLong
abstract long asLong()
Returns the value as a
{@code long}, otherwise throws an exception.
-
asBigInteger
abstract BigInteger asBigInteger()
Returns the value as a
{@code BigInteger}.
-
-
-
-