Integer (Java Platform SE 8 ) (original) (raw)
Modifier and Type
Method
Description
static int
[bitCount](../../java/lang/Integer.html#bitCount-int-)(int i)
Returns the number of one-bits in the two's complement binary representation of the specified int
value.
byte
[byteValue](../../java/lang/Integer.html#byteValue--)()
Returns the value of this Integer
as a byte
after a narrowing primitive conversion.
static int
[compare](../../java/lang/Integer.html#compare-int-int-)(int x, int y)
Compares two int
values numerically.
int
[compareTo](../../java/lang/Integer.html#compareTo-java.lang.Integer-)([Integer](../../java/lang/Integer.html "class in java.lang") anotherInteger)
Compares two Integer
objects numerically.
static int
[compareUnsigned](../../java/lang/Integer.html#compareUnsigned-int-int-)(int x, int y)
Compares two int
values numerically treating the values as unsigned.
static [Integer](../../java/lang/Integer.html "class in java.lang")
[decode](../../java/lang/Integer.html#decode-java.lang.String-)([String](../../java/lang/String.html "class in java.lang") nm)
Decodes a String
into an Integer
.
static int
[divideUnsigned](../../java/lang/Integer.html#divideUnsigned-int-int-)(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
[doubleValue](../../java/lang/Integer.html#doubleValue--)()
Returns the value of this Integer
as a double
after a widening primitive conversion.
boolean
[equals](../../java/lang/Integer.html#equals-java.lang.Object-)([Object](../../java/lang/Object.html "class in java.lang") obj)
Compares this object to the specified object.
float
[floatValue](../../java/lang/Integer.html#floatValue--)()
Returns the value of this Integer
as a float
after a widening primitive conversion.
static [Integer](../../java/lang/Integer.html "class in java.lang")
[getInteger](../../java/lang/Integer.html#getInteger-java.lang.String-)([String](../../java/lang/String.html "class in java.lang") nm)
Determines the integer value of the system property with the specified name.
static [Integer](../../java/lang/Integer.html "class in java.lang")
[getInteger](../../java/lang/Integer.html#getInteger-java.lang.String-int-)([String](../../java/lang/String.html "class in java.lang") nm, int val)
Determines the integer value of the system property with the specified name.
static [Integer](../../java/lang/Integer.html "class in java.lang")
[getInteger](../../java/lang/Integer.html#getInteger-java.lang.String-java.lang.Integer-)([String](../../java/lang/String.html "class in java.lang") nm,[Integer](../../java/lang/Integer.html "class in java.lang") val)
Returns the integer value of the system property with the specified name.
int
[hashCode](../../java/lang/Integer.html#hashCode--)()
Returns a hash code for this Integer
.
static int
[hashCode](../../java/lang/Integer.html#hashCode-int-)(int value)
Returns a hash code for a int
value; compatible withInteger.hashCode()
.
static int
[highestOneBit](../../java/lang/Integer.html#highestOneBit-int-)(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 specifiedint
value.
int
[intValue](../../java/lang/Integer.html#intValue--)()
Returns the value of this Integer
as anint
.
long
[longValue](../../java/lang/Integer.html#longValue--)()
Returns the value of this Integer
as a long
after a widening primitive conversion.
static int
[lowestOneBit](../../java/lang/Integer.html#lowestOneBit-int-)(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 specifiedint
value.
static int
[max](../../java/lang/Integer.html#max-int-int-)(int a, int b)
Returns the greater of two int
values as if by calling Math.max.
static int
[min](../../java/lang/Integer.html#min-int-int-)(int a, int b)
Returns the smaller of two int
values as if by calling Math.min.
static int
[numberOfLeadingZeros](../../java/lang/Integer.html#numberOfLeadingZeros-int-)(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](../../java/lang/Integer.html#numberOfTrailingZeros-int-)(int i)
Returns the number of zero bits following the lowest-order ("rightmost") one-bit in the two's complement binary representation of the specifiedint
value.
static int
[parseInt](../../java/lang/Integer.html#parseInt-java.lang.String-)([String](../../java/lang/String.html "class in java.lang") s)
Parses the string argument as a signed decimal integer.
static int
[parseInt](../../java/lang/Integer.html#parseInt-java.lang.String-int-)([String](../../java/lang/String.html "class in java.lang") s, int radix)
Parses the string argument as a signed integer in the radix specified by the second argument.
static int
[parseUnsignedInt](../../java/lang/Integer.html#parseUnsignedInt-java.lang.String-)([String](../../java/lang/String.html "class in java.lang") s)
Parses the string argument as an unsigned decimal integer.
static int
[parseUnsignedInt](../../java/lang/Integer.html#parseUnsignedInt-java.lang.String-int-)([String](../../java/lang/String.html "class in java.lang") s, int radix)
Parses the string argument as an unsigned integer in the radix specified by the second argument.
static int
[remainderUnsigned](../../java/lang/Integer.html#remainderUnsigned-int-int-)(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.
static int
[reverse](../../java/lang/Integer.html#reverse-int-)(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](../../java/lang/Integer.html#reverseBytes-int-)(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](../../java/lang/Integer.html#rotateLeft-int-int-)(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](../../java/lang/Integer.html#rotateRight-int-int-)(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
[shortValue](../../java/lang/Integer.html#shortValue--)()
Returns the value of this Integer
as a short
after a narrowing primitive conversion.
static int
[signum](../../java/lang/Integer.html#signum-int-)(int i)
Returns the signum function of the specified int
value.
static int
[sum](../../java/lang/Integer.html#sum-int-int-)(int a, int b)
Adds two integers together as per the + operator.
static [String](../../java/lang/String.html "class in java.lang")
[toBinaryString](../../java/lang/Integer.html#toBinaryString-int-)(int i)
Returns a string representation of the integer argument as an unsigned integer in base 2.
static [String](../../java/lang/String.html "class in java.lang")
[toHexString](../../java/lang/Integer.html#toHexString-int-)(int i)
Returns a string representation of the integer argument as an unsigned integer in base 16.
static [String](../../java/lang/String.html "class in java.lang")
[toOctalString](../../java/lang/Integer.html#toOctalString-int-)(int i)
Returns a string representation of the integer argument as an unsigned integer in base 8.
[String](../../java/lang/String.html "class in java.lang")
[toString](../../java/lang/Integer.html#toString--)()
Returns a String
object representing thisInteger
's value.
static [String](../../java/lang/String.html "class in java.lang")
[toString](../../java/lang/Integer.html#toString-int-)(int i)
Returns a String
object representing the specified integer.
static [String](../../java/lang/String.html "class in java.lang")
[toString](../../java/lang/Integer.html#toString-int-int-)(int i, int radix)
Returns a string representation of the first argument in the radix specified by the second argument.
static long
[toUnsignedLong](../../java/lang/Integer.html#toUnsignedLong-int-)(int x)
Converts the argument to a long
by an unsigned conversion.
static [String](../../java/lang/String.html "class in java.lang")
[toUnsignedString](../../java/lang/Integer.html#toUnsignedString-int-)(int i)
Returns a string representation of the argument as an unsigned decimal value.
static [String](../../java/lang/String.html "class in java.lang")
[toUnsignedString](../../java/lang/Integer.html#toUnsignedString-int-int-)(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.
static [Integer](../../java/lang/Integer.html "class in java.lang")
[valueOf](../../java/lang/Integer.html#valueOf-int-)(int i)
Returns an Integer
instance representing the specifiedint
value.
static [Integer](../../java/lang/Integer.html "class in java.lang")
[valueOf](../../java/lang/Integer.html#valueOf-java.lang.String-)([String](../../java/lang/String.html "class in java.lang") s)
Returns an Integer
object holding the value of the specified String
.
static [Integer](../../java/lang/Integer.html "class in java.lang")
[valueOf](../../java/lang/Integer.html#valueOf-java.lang.String-int-)([String](../../java/lang/String.html "class in java.lang") s, int radix)
Returns an Integer
object holding the value extracted from the specified String
when parsed with the radix given by the second argument.