Integer

Undocumented in source.

Constructors

this
this(int value)

Constructs a newly allocated {@code Integer} object that represents the specified {@code int} value.

Members

Functions

opCmp
int opCmp(Object o)
Undocumented in source. Be warned that the author may not have intended to support it.
opCmp
int opCmp(long n)
Undocumented in source. Be warned that the author may not have intended to support it.
toHash
size_t toHash()

Returns a hash code for a {@code double} value; compatible with {@code Double.hashCode()}.

Static functions

bitCount
int bitCount(int i)
Undocumented in source. Be warned that the author may not have intended to support it.
numberOfLeadingZeros
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 {@code int} value. Returns 32 if the specified value has no one-bits in its two's complement representation, in other words if it is equal to zero.

numberOfTrailingZeros
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 {@code int} value. Returns 32 if the specified value has no one-bits in its two's complement representation, in other words if it is equal to zero.

parseInt
int parseInt(string s)
Undocumented in source. Be warned that the author may not have intended to support it.
parseInt
int parseInt(string s, int radix)

Parses the string argument as a signed integer in the radix specified by the second argument. The characters in the string must all be digits of the specified radix (as determined by whether {@link java.lang.Character#digit(char, int)} returns a nonnegative value), except that the first character may be an ASCII minus sign {@code '-'} ({@code '\u005Cu002D'}) to indicate a negative value or an ASCII plus sign {@code '+'} ({@code '\u005Cu002B'}) to indicate a positive value. The resulting integer value is returned.

reverseBytes
int reverseBytes(int i)

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

rotateLeft
int rotateLeft(int i, int distance)

Returns the value obtained by rotating the two's complement binary representation of the specified {@code int} value left by the specified number of bits. (Bits shifted out of the left hand, or high-order, side reenter on the right, or low-order.)

rotateRight
int rotateRight(int i, int distance)

Returns the value obtained by rotating the two's complement binary representation of the specified {@code int} value right by the specified number of bits. (Bits shifted out of the right hand, or low-order, side reenter on the left, or high-order.)

valueOf
Integer valueOf(int i)

Returns an {@code Integer} instance representing the specified {@code int} value. If a new {@code Integer} instance is not required, this method should generally be used in preference to the constructor {@link #Integer(int)}, as this method is likely to yield significantly better space and time performance by caching frequently requested values.

valueOf
Integer valueOf(string s, int radix)

Returns an {@code Integer} object holding the value extracted from the specified {@code String} when parsed with the radix given by the second argument. The first argument is interpreted as representing a signed integer in the radix specified by the second argument, exactly as if the arguments were given to the {@link #parseInt(java.lang.String, int)} method. The result is an {@code Integer} object that represents the integer value specified by the string.

valueOf
Integer valueOf(string s)

Returns an {@code Integer} object holding the value of the specified {@code String}. The argument is interpreted as representing a signed decimal integer, exactly as if the argument were given to the {@link #parseInt(java.lang.String)} method. The result is an {@code Integer} object that represents the integer value specified by the string.

Variables

BYTES
enum int BYTES;

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

MAX_VALUE
enum int MAX_VALUE;

A constant holding the maximum value an {@code int} can have, 2!(sup)31</sup>-1.

MIN_VALUE
enum int MIN_VALUE;

Returns the number of one-bits in the two's complement binary representation of the specified {@code int} value. This function is sometimes referred to as the <i>population count</i>.

SIZE
enum int SIZE;

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

digits
enum char[] digits;
Undocumented in source.

Meta