|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Number java.lang.Integer
public final class Integer
Minimal Integer implementation that supports converting an int to a String.
Field Summary | |
---|---|
static int |
MAX_RADIX
Deprecated. use constant in Character |
static int |
MAX_VALUE
The largest value of type int . |
static int |
MIN_RADIX
Deprecated. use constant in Character |
static int |
MIN_VALUE
The smallest value of type int . |
static int |
SIZE
|
Constructor Summary | |
---|---|
Integer(int value)
Constructs a newly allocated Integer object that
represents the primitive int argument. |
|
Integer(String s)
|
Method Summary | |
---|---|
int |
bitCount(int v)
|
byte |
byteValue()
Return the byte value of this Number. |
int |
compareTo(Integer ob)
Compares this with another Object. |
static int |
digit(char ch,
int radix)
Deprecated. use Character.digit(char, int) instead. |
static int |
digit(int ch,
int radix)
Deprecated. use Character.digit(int, int) instead. |
double |
doubleValue()
Return the double value of this Number. |
boolean |
equals(Object o)
|
float |
floatValue()
Return the float value of this Number. |
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)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
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
@Deprecated public static final int MIN_RADIX
Character
@Deprecated public static final int MAX_RADIX
Character
Constructor Detail |
---|
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)
Method Detail |
---|
public int bitCount(int v)
public byte byteValue()
Number
byteValue
in class Number
public int compareTo(Integer ob)
Comparable
compareTo
in interface Comparable<Integer>
ob
- the object to compare with
public double doubleValue()
Number
doubleValue
in class Number
public boolean equals(Object o)
equals
in class Object
public float floatValue()
Number
floatValue
in class Number
public int hashCode()
hashCode
in class Object
public static int highestOneBit(int v)
public int intValue()
intValue
in class Number
public long longValue()
Number
longValue
in class Number
public 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. 16
NumberFormatException
public 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()
Number
shortValue
in class Number
public static int signnum(long i)
public static String toBinaryString(int v)
public static String toHexString(int v)
v
- the int
public static String toOctalString(int v)
public String toString()
toString
in class Object
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)
public static Integer valueOf(String s)
public static Integer valueOf(String s, int radix)
@Deprecated public static int digit(char ch, int radix)
Character.digit(char, int)
instead.
@Deprecated public static int digit(int ch, int radix)
Character.digit(int, int)
instead.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |