jdk/src/share/classes/java/lang/Integer.java
changeset 24865 09b1d992ca72
parent 23010 6dadb192ad81
child 25653 41e5fa7ce490
equal deleted inserted replaced
24864:a7bf63ebda64 24865:09b1d992ca72
    45  *
    45  *
    46  * @author  Lee Boynton
    46  * @author  Lee Boynton
    47  * @author  Arthur van Hoff
    47  * @author  Arthur van Hoff
    48  * @author  Josh Bloch
    48  * @author  Josh Bloch
    49  * @author  Joseph D. Darcy
    49  * @author  Joseph D. Darcy
    50  * @since JDK1.0
    50  * @since 1.0
    51  */
    51  */
    52 public final class Integer extends Number implements Comparable<Integer> {
    52 public final class Integer extends Number implements Comparable<Integer> {
    53     /**
    53     /**
    54      * A constant holding the minimum value an {@code int} can
    54      * A constant holding the minimum value an {@code int} can
    55      * have, -2<sup>31</sup>.
    55      * have, -2<sup>31</sup>.
    64 
    64 
    65     /**
    65     /**
    66      * The {@code Class} instance representing the primitive type
    66      * The {@code Class} instance representing the primitive type
    67      * {@code int}.
    67      * {@code int}.
    68      *
    68      *
    69      * @since   JDK1.1
    69      * @since   1.1
    70      */
    70      */
    71     @SuppressWarnings("unchecked")
    71     @SuppressWarnings("unchecked")
    72     public static final Class<Integer>  TYPE = (Class<Integer>) Class.getPrimitiveClass("int");
    72     public static final Class<Integer>  TYPE = (Class<Integer>) Class.getPrimitiveClass("int");
    73 
    73 
    74     /**
    74     /**
   225      * @param   i   an integer to be converted to a string.
   225      * @param   i   an integer to be converted to a string.
   226      * @return  the string representation of the unsigned integer value
   226      * @return  the string representation of the unsigned integer value
   227      *          represented by the argument in hexadecimal (base&nbsp;16).
   227      *          represented by the argument in hexadecimal (base&nbsp;16).
   228      * @see #parseUnsignedInt(String, int)
   228      * @see #parseUnsignedInt(String, int)
   229      * @see #toUnsignedString(int, int)
   229      * @see #toUnsignedString(int, int)
   230      * @since   JDK1.0.2
   230      * @since   1.0.2
   231      */
   231      */
   232     public static String toHexString(int i) {
   232     public static String toHexString(int i) {
   233         return toUnsignedString0(i, 4);
   233         return toUnsignedString0(i, 4);
   234     }
   234     }
   235 
   235 
   263      * @param   i   an integer to be converted to a string.
   263      * @param   i   an integer to be converted to a string.
   264      * @return  the string representation of the unsigned integer value
   264      * @return  the string representation of the unsigned integer value
   265      *          represented by the argument in octal (base&nbsp;8).
   265      *          represented by the argument in octal (base&nbsp;8).
   266      * @see #parseUnsignedInt(String, int)
   266      * @see #parseUnsignedInt(String, int)
   267      * @see #toUnsignedString(int, int)
   267      * @see #toUnsignedString(int, int)
   268      * @since   JDK1.0.2
   268      * @since   1.0.2
   269      */
   269      */
   270     public static String toOctalString(int i) {
   270     public static String toOctalString(int i) {
   271         return toUnsignedString0(i, 3);
   271         return toUnsignedString0(i, 3);
   272     }
   272     }
   273 
   273 
   295      * @param   i   an integer to be converted to a string.
   295      * @param   i   an integer to be converted to a string.
   296      * @return  the string representation of the unsigned integer value
   296      * @return  the string representation of the unsigned integer value
   297      *          represented by the argument in binary (base&nbsp;2).
   297      *          represented by the argument in binary (base&nbsp;2).
   298      * @see #parseUnsignedInt(String, int)
   298      * @see #parseUnsignedInt(String, int)
   299      * @see #toUnsignedString(int, int)
   299      * @see #toUnsignedString(int, int)
   300      * @since   JDK1.0.2
   300      * @since   1.0.2
   301      */
   301      */
   302     public static String toBinaryString(int i) {
   302     public static String toBinaryString(int i) {
   303         return toUnsignedString0(i, 1);
   303         return toUnsignedString0(i, 1);
   304     }
   304     }
   305 
   305