API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.lang. Short View Source
Author(s)
Nakul Saraiya
Since
JDK1.1
Version
1.45, 04/07/06
Serial
Hierarchy
 Object
      Number
          Short
Implements
 Comparable
Subclasses
Description
publicfinal class Short
  The Short class wraps a value of primitive type short in an object.
See also:    Number
Constructors
public Short (short value)
  Constructs a newly allocated Short object that represents the specified short value.
public Short (String s) throws NumberFormatException
  Constructs a newly allocated Short object that represents the short value indicated by the String parameter.
Methods
Hide/Show inherited methods
public byte byteValue () [Overrides Number]
Returns the value of this Short as a byte.
public int compareTo (Short anotherShort)
  Compares two Short objects numerically.
publicstatic Short decode (String nm) throws NumberFormatException
  Decodes a String into a Short.
public double doubleValue () [Specified in Number]
Returns the value of this Short 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 Short as a float.
public int hashCode ()
Returns a hash code for this Short.
public int intValue () [Specified in Number]
Returns the value of this Short as an int.
public long longValue () [Specified in Number]
Returns the value of this Short as a long.
publicstatic short parseShort (String s) throws NumberFormatException
  Parses the string argument as a signed decimal short.
publicstatic short parseShort (String s, int radix) throws NumberFormatException
  Parses the string argument as a signed short in the radix specified by the second argument.
publicstatic short reverseBytes (short i)
  Returns the value obtained by reversing the order of the bytes in the two's complement representation of the specified short value.
public short shortValue () [Overrides Number]
Returns the value of this Short as a short.
public String toString ()
  Returns a String object representing this Short's value.
publicstatic String toString (short s)
  Returns a new String object representing the specified short.
publicstatic Short valueOf (short s)
  Returns a Short instance representing the specified short value.
publicstatic Short valueOf (String s) throws NumberFormatException
  Returns a Short object holding the value given by the specified String.
publicstatic Short valueOf (String s, int radix) throws NumberFormatException
  Returns a Short object holding the value extracted from the specified String when parsed with the radix given by the second argument.
Fields
Hide/Show inherited fields
publicfinalstatic short MAX_VALUE = "32767"
A constant holding the maximum value a short can have, 215-1.
publicfinalstatic short MIN_VALUE = "-32768"
A constant holding the minimum value a short can have, -215.
publicfinalstatic int SIZE = "16"
  The number of bits used to represent a short value in two's complement binary form.
publicfinalstatic Class<Short> TYPE
The Class instance representing the primitive type short.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar