public final class Integer extends Number implements Comparable<Integer>
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_VALUE
The largest value of type
int. |
static int |
MIN_VALUE
The smallest value of type
int. |
static int |
SIZE |
static Class<?> |
TYPE |
| Constructor and Description |
|---|
Integer(int value)
Constructs a newly allocated
Integer object that
represents the primitive int argument. |
Integer(String s) |
| Modifier and Type | Method and Description |
|---|---|
static int |
bitCount(int v) |
byte |
byteValue()
Return the byte value of this Number.
|
int |
compareTo(Integer ob)
Compares this with another Object.
|
static Integer |
decode(String s) |
double |
doubleValue()
Return the double value of this Number.
|
boolean |
equals(Object o) |
float |
floatValue()
Return the float value of this Number.
|
static Integer |
getInteger(String name) |
static Integer |
getInteger(String name,
int def) |
static Integer |
getInteger(String name,
Integer def) |
int |
hashCode() |
static int |
highestOneBit(int v) |
int |
intValue()
returns the value of this Integer as int
|
long |
longValue()
Return the long value of this Number.
|
static int |
lowestOneBit(int v) |
static int |
numberOfLeadingZeros(int v) |
static int |
numberOfTrailingZeros(int v) |
static int |
parseInt(String s) |
static int |
parseInt(String s,
int radix)
This method parses an int from a String.
|
static int |
reverse(int v) |
static int |
reverseBytes(int v) |
static int |
rotateLeft(int v,
int bits) |
static int |
rotateRight(int v,
int bits) |
short |
shortValue()
Return the short value of this Number.
|
static int |
signnum(long i) |
static String |
toBinaryString(int v) |
static String |
toHexString(int v)
Return the hex representation of an int as a String
|
static String |
toOctalString(int v) |
String |
toString()
Returns a String object representing this Integer's value.
|
static String |
toString(int v)
Returns a new String object representing the specified integer.
|
static String |
toString(int v,
int radix) |
static Integer |
valueOf(int v) |
static Integer |
valueOf(String s) |
static Integer |
valueOf(String s,
int radix) |
public static final int MAX_VALUE
int. The constant
value of this field is 2147483647.public static final int MIN_VALUE
int. The constant
value of this field is -2147483648.public static final int SIZE
public static final Class<?> TYPE
public Integer(int value)
Integer object that
represents the primitive int argument.value - the value to be represented by the Integer.public Integer(String s)
public static int bitCount(int v)
public byte byteValue()
Numberpublic int compareTo(Integer ob)
ComparablecompareTo in interface Comparable<Integer>ob - the object to compare withpublic double doubleValue()
NumberdoubleValue in class Numberpublic float floatValue()
NumberfloatValue in class Numberpublic static int highestOneBit(int v)
public int intValue()
public long longValue()
Numberpublic static int lowestOneBit(int v)
public static int numberOfLeadingZeros(int v)
public static int numberOfTrailingZeros(int v)
public static int parseInt(String s)
public static int parseInt(String s, int radix)
s - The number string e.g. "123" or "FF" if radix is 16.radix - The base number system e.g. 16NumberFormatExceptionpublic static int reverse(int v)
public static int reverseBytes(int v)
public static int rotateLeft(int v,
int bits)
public static int rotateRight(int v,
int bits)
public short shortValue()
NumbershortValue in class Numberpublic static int signnum(long i)
public static String toBinaryString(int v)
public static String toHexString(int v)
v - the intpublic static String toOctalString(int v)
public String toString()
public static String toString(int v)
v - an integer to be converted.public static String toString(int v, int radix)
public static Integer valueOf(int v)