• Field Summary

    Fields

    static final int

    The number of bytes used to represent an int value in two's complement binary form.

    static final int

    A constant holding the maximum value an int can have, 231-1.

    static final int

    A constant holding the minimum value an int can have, -231.

    static final int

    The number of bits used to represent an int value in two's complement binary form.

    The Class instance representing the primitive type int.

  • Constructor Summary

    Constructors

    Integer(int value)

    Deprecated, for removal: This API element is subject to removal in a future version.

    Deprecated, for removal: This API element is subject to removal in a future version.

  • Method Summary

    static int

    bitCount(int i)

    Returns the number of one-bits in the two's complement binary representation of the specified int value.

    byte

    byteValue()

    Returns the value of this Integer as a byte after a narrowing primitive conversion.

    static int

    compare(int x, int y)

    Compares two int values numerically.

    int

    Compares two Integer objects numerically.

    static int

    compareUnsigned(int x, int y)

    Compares two int values numerically treating the values as unsigned.

    static int

    compress(int i, int mask)

    Returns the value obtained by compressing the bits of the specified int value, i, in accordance with the specified bit mask.

    Decodes a String into an Integer.

    Returns an Optional containing the nominal descriptor for this instance, which is the instance itself.

    static int

    divideUnsigned(int dividend, int divisor)

    Returns the unsigned quotient of dividing the first argument by the second where each argument and the result is interpreted as an unsigned value.

    double

    Returns the value of this Integer as a double after a widening primitive conversion.

    boolean

    Compares this object to the specified object.

    static int

    expand(int i, int mask)

    Returns the value obtained by expanding the bits of the specified int value, i, in accordance with the specified bit mask.

    float

    Returns the value of this Integer as a float after a widening primitive conversion.

    Determines the integer value of the system property with the specified name.

    Determines the integer value of the system property with the specified name.

    Returns the integer value of the system property with the specified name.

    int

    hashCode()

    Returns a hash code for this Integer.

    static int

    hashCode(int value)

    Returns a hash code for an int value; compatible with Integer.hashCode().

    static int

    highestOneBit(int i)

    Returns an int value with at most a single one-bit, in the position of the highest-order ("leftmost") one-bit in the specified int value.

    int

    intValue()

    Returns the value of this Integer as an int.

    long

    longValue()

    Returns the value of this Integer as a long after a widening primitive conversion.

    static int

    lowestOneBit(int i)

    Returns an int value with at most a single one-bit, in the position of the lowest-order ("rightmost") one-bit in the specified int value.

    static int

    max(int a, int b)

    Returns the greater of two int values as if by calling Math.max.

    static int

    min(int a, int b)

    Returns the smaller of two int values as if by calling Math.min.

    static int

    numberOfLeadingZeros(int i)

    Returns the number of zero bits preceding the highest-order ("leftmost") one-bit in the two's complement binary representation of the specified int value.

    static int

    numberOfTrailingZeros(int i)

    Returns the number of zero bits following the lowest-order ("rightmost") one-bit in the two's complement binary representation of the specified int value.

    static int

    parseInt(CharSequence s, int beginIndex, int endIndex, int radix)

    Parses the CharSequence argument as a signed int in the specified radix, beginning at the specified beginIndex and extending to endIndex - 1.

    static int

    Parses the string argument as a signed decimal integer.

    static int

    Parses the string argument as a signed integer in the radix specified by the second argument.

    static int

    parseUnsignedInt(CharSequence s, int beginIndex, int endIndex, int radix)

    Parses the CharSequence argument as an unsigned int in the specified radix, beginning at the specified beginIndex and extending to endIndex - 1.

    static int

    Parses the string argument as an unsigned decimal integer.

    static int

    Parses the string argument as an unsigned integer in the radix specified by the second argument.

    static int

    remainderUnsigned(int dividend, int divisor)

    Returns the unsigned remainder from dividing the first argument by the second where each argument and the result is interpreted as an unsigned value.

    Resolves this instance as a ConstantDesc, the result of which is the instance itself.

    static int

    reverse(int i)

    Returns the value obtained by reversing the order of the bits in the two's complement binary representation of the specified int value.

    static int

    reverseBytes(int i)

    Returns the value obtained by reversing the order of the bytes in the two's complement representation of the specified int value.

    static int

    rotateLeft(int i, int distance)

    Returns the value obtained by rotating the two's complement binary representation of the specified int value left by the specified number of bits.

    static int

    rotateRight(int i, int distance)

    Returns the value obtained by rotating the two's complement binary representation of the specified int value right by the specified number of bits.

    short

    Returns the value of this Integer as a short after a narrowing primitive conversion.

    static int

    signum(int i)

    Returns the signum function of the specified int value.

    static int

    sum(int a, int b)

    Adds two integers together as per the + operator.

    toBinaryString(int i)

    Returns a string representation of the integer argument as an unsigned integer in base 2.

    toHexString(int i)

    Returns a string representation of the integer argument as an unsigned integer in base 16.

    toOctalString(int i)

    Returns a string representation of the integer argument as an unsigned integer in base 8.

    toString()

    Returns a String object representing this Integer's value.

    toString(int i)

    Returns a String object representing the specified integer.

    toString(int i, int radix)

    Returns a string representation of the first argument in the radix specified by the second argument.

    static long

    toUnsignedLong(int x)

    Converts the argument to a long by an unsigned conversion.

    toUnsignedString(int i)

    Returns a string representation of the argument as an unsigned decimal value.

    toUnsignedString(int i, int radix)

    Returns a string representation of the first argument as an unsigned integer value in the radix specified by the second argument.

    valueOf(int i)

    Returns an Integer instance representing the specified int value.

    Returns an Integer object holding the value of the specified String.

    Returns an Integer object holding the value extracted from the specified String when parsed with the radix given by the second argument.

  • Field Details

    • MIN_VALUE

    • MAX_VALUE

    • TYPE

    • SIZE

    • BYTES

  • Constructor Details

    • Integer

    • Integer

  • Method Details

    • toString

    • toUnsignedString

    • toHexString

    • toOctalString

    • toBinaryString

    • toString

    • toUnsignedString

    • parseInt

    • parseInt

    • parseInt

    • parseUnsignedInt

    • parseUnsignedInt

    • parseUnsignedInt

    • valueOf

    • valueOf

    • valueOf

    • byteValue

    • shortValue

    • intValue

    • longValue

    • floatValue

    • doubleValue

    • toString

    • hashCode

    • hashCode

    • equals

    • getInteger

    • getInteger

    • getInteger

    • decode

    • compareTo

    • compare

    • compareUnsigned

    • toUnsignedLong

    • divideUnsigned

    • remainderUnsigned

    • highestOneBit

    • lowestOneBit

    • numberOfLeadingZeros

    • numberOfTrailingZeros

    • bitCount

    • rotateLeft

    • rotateRight

    • reverse

    • compress

    • expand

    • signum

    • reverseBytes

    • sum

    • max

    • min

    • describeConstable

    • resolveConstantDesc