API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.lang. Integer View Source
Author(s)
Lee Boynton
Arthur van Hoff
Josh Bloch
Since
JDK1.0
Version
1.92, 04/07/06
Serial
Hierarchy
 Object
      Number
          Integer
Implements
 Comparable
Subclasses
Description
publicfinal class Integer
  The Integer class wraps a value of the primitive type int in an object.
See also:   
Constructors
public Integer (int value)
  Constructs a newly allocated Integer object that represents the specified int value.
public Integer (String s) throws NumberFormatException
  Constructs a newly allocated Integer object that represents the int value indicated by the String parameter.
Methods
Hide/Show inherited methods
publicstatic int bitCount (int i)
  Returns the number of one-bits in the two's complement binary representation of the specified int value.
public byte byteValue () [Overrides Number]
Returns the value of this Integer as a byte.
public int compareTo (Integer anotherInteger)
  Compares two Integer objects numerically.
publicstatic Integer decode (String nm) throws NumberFormatException
  Decodes a String into an Integer.
public double doubleValue () [Specified in Number]
Returns the value of this Integer as a double.
public boolean equals (Object obj)
  Compares this object to the specified object.
public float floatValue () [Specified in Number]
Returns the value of this Integer as a float.
pack-privatestatic void getChars (int i, int index, char[] buf)
  Places characters representing the integer i into the character array buf.
publicstatic Integer getInteger (String nm)
  Determines the integer value of the system property with the specified name.
publicstatic Integer getInteger (String nm, int val)
  Determines the integer value of the system property with the specified name.
publicstatic Integer getInteger (String nm, Integer val)
  Returns the integer value of the system property with the specified name.
public int hashCode ()
  Returns a hash code for this Integer.
publicstatic int highestOneBit (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 specified int value.
public int intValue () [Specified in Number]
Returns the value of this Integer as an int.
public long longValue () [Specified in Number]
Returns the value of this Integer as a long.
publicstatic int lowestOneBit (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 specified int value.
publicstatic int numberOfLeadingZeros (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.
publicstatic int numberOfTrailingZeros (int i)
  Returns the number of zero bits following the lowest-order ("rightmost") one-bit in the two's complement binary representation of the specified int value.
publicstatic int parseInt (String s) throws NumberFormatException
  Parses the string argument as a signed decimal integer.
publicstatic int parseInt (String s, int radix) throws NumberFormatException
  Parses the string argument as a signed integer in the radix specified by the second argument.
publicstatic int reverse (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.
publicstatic int reverseBytes (int i)
  Returns the value obtained by reversing the order of the bytes in the two's complement representation of the specified int value.
publicstatic int rotateLeft (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.
publicstatic int rotateRight (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.
public short shortValue () [Overrides Number]
Returns the value of this Integer as a short.
publicstatic int signum (int i)
  Returns the signum function of the specified int value.
pack-privatestatic int stringSize (int x)
publicstatic String toBinaryString (int i)
  Returns a string representation of the integer argument as an unsigned integer in base 2.
publicstatic String toHexString (int i)
  Returns a string representation of the integer argument as an unsigned integer in base 16.
publicstatic String toOctalString (int i)
  Returns a string representation of the integer argument as an unsigned integer in base 8.
public String toString ()
  Returns a String object representing this Integer's value.
publicstatic String toString (int i)
  Returns a String object representing the specified integer.
publicstatic String toString (int i, int radix)
  Returns a string representation of the first argument in the radix specified by the second argument.
publicstatic Integer valueOf (int i)
  Returns a Integer instance representing the specified int value.
publicstatic Integer valueOf (String s) throws NumberFormatException
  Returns an Integer object holding the value of the specified String.
publicstatic Integer valueOf (String s, int radix) throws NumberFormatException
  Returns an Integer object holding the value extracted from the specified String when parsed with the radix given by the second argument.
Fields
Hide/Show inherited fields
pack-privatefinalstatic char DigitOnes
pack-privatefinalstatic char digits
All possible chars for representing a number as a String
pack-privatefinalstatic char DigitTens
publicfinalstatic int MAX_VALUE = "2147483647"
A constant holding the maximum value an int can have, 231-1.
publicfinalstatic int MIN_VALUE = "-2147483648"
A constant holding the minimum value an int can have, -231.
publicfinalstatic int SIZE = "32"
  The number of bits used to represent an int value in two's complement binary form.
pack-privatefinalstatic int sizeTable
publicfinalstatic Class<Integer> TYPE
  The Class instance representing the primitive type int.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar