|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Integer
public final class Integer
Minimal Integer implementation that supports converting an int to a String.
Field Summary | |
---|---|
static int |
MAX_RADIX
Normally this is stored in Character in the standard java.lang package but we don't have Character. |
static int |
MAX_VALUE
The largest value of type int . |
static int |
MIN_RADIX
Normally this is stored in Character in the standard java.lang package but we don't have Character. |
static int |
MIN_VALUE
The smallest value of type int . |
Constructor Summary | |
---|---|
Integer(int value)
Constructs a newly allocated Integer object that
represents the primitive int argument. |
Method Summary | |
---|---|
static int |
digit(char ch,
int radix)
This method accepts a character such as '7' or 'C' and converts it to a number value. |
static int |
digit(int codePoint,
int radix)
|
static int |
parseInt(String s)
|
static int |
parseInt(String s,
int radix)
This method parses an int from a String. |
String |
toString()
Returns a String object representing this Integer's value. |
static String |
toString(int i)
Returns a new String object representing the specified integer. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait |
Field Detail |
---|
public static final int MIN_VALUE
int
. The constant
value of this field is -2147483648.
public static final int MAX_VALUE
int
. The constant
value of this field is 2147483647.
public static final int MIN_RADIX
public static final int MAX_RADIX
Constructor Detail |
---|
public Integer(int value)
Integer
object that
represents the primitive int
argument.
value
- the value to be represented by the Integer
.Method Detail |
---|
public static int parseInt(String s, int radix) throws NumberFormatException
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 parseInt(String s) throws NumberFormatException
NumberFormatException
public static int digit(char ch, int radix)
ch
- radix
-
public static int digit(int codePoint, int radix)
public static String toString(int i)
i
- an integer to be converted.
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |