src/share/classes/java/lang/Short.java

Print this page
rev 10048 : 8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
Reviewed-by:


  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package java.lang;
  27 
  28 /**
  29  * The {@code Short} class wraps a value of primitive type {@code
  30  * short} in an object.  An object of type {@code Short} contains a
  31  * single field whose type is {@code short}.
  32  *
  33  * <p>In addition, this class provides several methods for converting
  34  * a {@code short} to a {@code String} and a {@code String} to a
  35  * {@code short}, as well as other constants and methods useful when
  36  * dealing with a {@code short}.
  37  *
  38  * @author  Nakul Saraiya
  39  * @author  Joseph D. Darcy
  40  * @see     java.lang.Number
  41  * @since   JDK1.1
  42  */
  43 public final class Short extends Number implements Comparable<Short> {
  44 
  45     /**
  46      * A constant holding the minimum value a {@code short} can
  47      * have, -2<sup>15</sup>.
  48      */
  49     public static final short   MIN_VALUE = -32768;
  50 
  51     /**
  52      * A constant holding the maximum value a {@code short} can
  53      * have, 2<sup>15</sup>-1.
  54      */
  55     public static final short   MAX_VALUE = 32767;
  56 
  57     /**
  58      * The {@code Class} instance representing the primitive type
  59      * {@code short}.
  60      */
  61     @SuppressWarnings("unchecked")




  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package java.lang;
  27 
  28 /**
  29  * The {@code Short} class wraps a value of primitive type {@code
  30  * short} in an object.  An object of type {@code Short} contains a
  31  * single field whose type is {@code short}.
  32  *
  33  * <p>In addition, this class provides several methods for converting
  34  * a {@code short} to a {@code String} and a {@code String} to a
  35  * {@code short}, as well as other constants and methods useful when
  36  * dealing with a {@code short}.
  37  *
  38  * @author  Nakul Saraiya
  39  * @author  Joseph D. Darcy
  40  * @see     java.lang.Number
  41  * @since   1.1
  42  */
  43 public final class Short extends Number implements Comparable<Short> {
  44 
  45     /**
  46      * A constant holding the minimum value a {@code short} can
  47      * have, -2<sup>15</sup>.
  48      */
  49     public static final short   MIN_VALUE = -32768;
  50 
  51     /**
  52      * A constant holding the maximum value a {@code short} can
  53      * have, 2<sup>15</sup>-1.
  54      */
  55     public static final short   MAX_VALUE = 32767;
  56 
  57     /**
  58      * The {@code Class} instance representing the primitive type
  59      * {@code short}.
  60      */
  61     @SuppressWarnings("unchecked")