Interface IntegerValue

    • Method Detail

      • isInByteRange

        boolean isInByteRange()
        Returns true if the value is in the range of [-27 to 27-1].
      • isInShortRange

        boolean isInShortRange()
        Returns true if the value is in the range of [-215 to 215-1]
      • isInIntRange

        boolean isInIntRange()
        Returns true if the value is in the range of [-231 to 231-1]
      • isInLongRange

        boolean isInLongRange()
        Returns true if the value is in the range of [-263 to 263-1]
      • mostSuccinctMessageFormat

        MessageFormat mostSuccinctMessageFormat()
        Returns the most succinct MessageFormat type to represent this integer value.
        Returns:
        the smallest integer type of MessageFormat that is big enough to store the value.
      • asByte

        byte asByte()
        Returns the value as a byte, otherwise throws an exception.
        Throws:
        MessageIntegerOverflowException - If the value does not fit in the range of byte type.
      • asShort

        short asShort()
        Returns the value as a short, otherwise throws an exception.
        Throws:
        MessageIntegerOverflowException - If the value does not fit in the range of short type.
      • asInt

        int asInt()
        Returns the value as an int, otherwise throws an exception.
        Throws:
        MessageIntegerOverflowException - If the value does not fit in the range of int type.
      • asLong

        long asLong()
        Returns the value as a long, otherwise throws an exception.
        Throws:
        MessageIntegerOverflowException - If the value does not fit in the range of long type.
      • asBigInteger

        java.math.BigInteger asBigInteger()
        Returns the value as a BigInteger.