Integer (Java Platform SE 7 ) (original) (raw)
Modifier and Type
Method and Description
static int
**[bitCount](../../java/lang/Integer.html#bitCount%28int%29)**(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%28%29)**()
Returns the value of this Integer
as abyte
.
static int
**[compare](../../java/lang/Integer.html#compare%28int,%20int%29)**(int x, int y)
Compares two int
values numerically.
int
**[compareTo](../../java/lang/Integer.html#compareTo%28java.lang.Integer%29)**([Integer](../../java/lang/Integer.html "class in java.lang") anotherInteger)
Compares two Integer
objects numerically.
static [Integer](../../java/lang/Integer.html "class in java.lang")
**[decode](../../java/lang/Integer.html#decode%28java.lang.String%29)**([String](../../java/lang/String.html "class in java.lang") nm)
Decodes a String
into an Integer
.
double
**[doubleValue](../../java/lang/Integer.html#doubleValue%28%29)**()
Returns the value of this Integer
as adouble
.
boolean
**[equals](../../java/lang/Integer.html#equals%28java.lang.Object%29)**([Object](../../java/lang/Object.html "class in java.lang") obj)
Compares this object to the specified object.
float
**[floatValue](../../java/lang/Integer.html#floatValue%28%29)**()
Returns the value of this Integer
as afloat
.
static [Integer](../../java/lang/Integer.html "class in java.lang")
**[getInteger](../../java/lang/Integer.html#getInteger%28java.lang.String%29)**([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%28java.lang.String,%20int%29)**([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%28java.lang.String,%20java.lang.Integer%29)**([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%28%29)**()
Returns a hash code for this Integer
.
static int
**[highestOneBit](../../java/lang/Integer.html#highestOneBit%28int%29)**(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%28%29)**()
Returns the value of this Integer
as anint
.
long
**[longValue](../../java/lang/Integer.html#longValue%28%29)**()
Returns the value of this Integer
as along
.
static int
**[lowestOneBit](../../java/lang/Integer.html#lowestOneBit%28int%29)**(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
**[numberOfLeadingZeros](../../java/lang/Integer.html#numberOfLeadingZeros%28int%29)**(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%28int%29)**(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%28java.lang.String%29)**([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%28java.lang.String,%20int%29)**([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
**[reverse](../../java/lang/Integer.html#reverse%28int%29)**(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%28int%29)**(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%28int,%20int%29)**(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%28int,%20int%29)**(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%28%29)**()
Returns the value of this Integer
as ashort
.
static int
**[signum](../../java/lang/Integer.html#signum%28int%29)**(int i)
Returns the signum function of the specified int
value.
static [String](../../java/lang/String.html "class in java.lang")
**[toBinaryString](../../java/lang/Integer.html#toBinaryString%28int%29)**(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%28int%29)**(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%28int%29)**(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%28%29)**()
Returns a String
object representing thisInteger
's value.
static [String](../../java/lang/String.html "class in java.lang")
**[toString](../../java/lang/Integer.html#toString%28int%29)**(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%28int,%20int%29)**(int i, int radix)
Returns a string representation of the first argument in the radix specified by the second argument.
static [Integer](../../java/lang/Integer.html "class in java.lang")
**[valueOf](../../java/lang/Integer.html#valueOf%28int%29)**(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%28java.lang.String%29)**([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%28java.lang.String,%20int%29)**([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.