java.lang.Integer (JDK 1.0)
This class provides an immutable object wrapper around the int primitive data type. This class also contains useful minimum and maximum constants and useful conversion methods. parseInt() and valueOf() convert a string to an int or to an Integer, respectively. Each can take a radix argument to specify the base that the value is represented in. decode() also converts a String to an Integer. It assumes a hexadecimal number if the string begins with "0X" or "0x," or an octal number if the string begins with "0". Otherwise, a decimal number is assumed.
toString() converts in the other direction, and the static version takes a radix argument. toBinaryString(), toOctalString(), and toHexString() convert an int to a string using base 2, base 8, and base 16. These methods treat the integer as an unsigned value.
Other routines return the value of an Integer as various primitive types, and finally, the getInteger() methods return the integer value of a named property from the system property list or the specified default value.
public final classIntegerextends Number { //Public ConstructorspublicInteger(intvalue); publicInteger(Strings) throws NumberFormatException; //Constantspublic static final intMAX_VALUE; public static final intMIN_VALUE; 1.1public static final ClassTYPE; //Class Methods1.1public static Integerdecode(Stringnm) throws NumberFormatException; public static IntegergetInteger(Stringnm); public static IntegergetInteger(Stringnm, intval); public static IntegergetInteger(Stringnm, Integerval); public static intparseInt(Strings, intradix) throws NumberFormatException; public static intparseInt(Strings) throws NumberFormatException; public static StringtoBinaryString(inti); public static StringtoHexString(inti); public static StringtoOctalString(inti); public static StringtoString(inti, intradix); public static StringtoString(inti); public static IntegervalueOf(Strings, intradix) throws NumberFormatException; public static IntegervalueOf(Strings) throws NumberFormatException; //Public Instance Methods1.1public bytebyteValue(); //Overrides Numberpublic doubledoubleValue(); //Defines Numberpublic booleanequals(Objectobj); //Overrides Objectpublic floatfloatValue(); //Defines Numberpublic inthashCode(); //Overrides Objectpublic intintValue(); //Defines Numberpublic longlongValue(); //Defines Number1.1public shortshortValue(); //Overrides Numberpublic StringtoString(); //Overrides Object}
Hierarchy:
Object->Number(Serializable)->Integer
Passed To:
Integer.getInteger()
Returned By:
Integer.decode(), Integer.getInteger(), Integer.valueOf()