Package 

Interface IntegerValue

  • 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 boolean isInByteRange() Returns true if the value is in the range of [-27 to 27-1].
      abstract boolean isInShortRange() Returns true if the value is in the range of [-215 to 215-1]
      abstract boolean isInIntRange() Returns true if the value is in the range of [-231 to 231-1]
      abstract boolean isInLongRange() Returns true if the value is in the range of [-263 to 263-1]
      abstract MessageFormat mostSuccinctMessageFormat() Returns the most succinct MessageFormat type to represent this integer value.
      abstract byte asByte() Returns the value as a {@code byte}, otherwise throws an exception.
      abstract short asShort() Returns the value as a {@code short}, otherwise throws an exception.
      abstract int asInt() Returns the value as an {@code int}, otherwise throws an exception.
      abstract long asLong() Returns the value as a {@code long}, otherwise throws an exception.
      abstract BigInteger asBigInteger() 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]

      • 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.