| |
|
| java.lang.Object java.lang.Number java.lang.Short
Inner Class :static class valueOfCache | |
Field Summary | |
final public static short | MAX_VALUE
Constant for the maximum short value, 215-1. | final public static short | MIN_VALUE
Constant for the minimum short value, -215. | final public static int | SIZE
Constant for the number of bits to represent a short in
two's compliment form. | final public static Class<Short> | TYPE The java.lang.Class that represents this class. |
Constructor Summary | |
public | Short(String string) Constructs a new instance of this class given a string. | public | Short(short value) Constructs a new instance of the receiver which represents the short
valued argument. |
Method Summary | |
public byte | byteValue() | public int | compareTo(Short object)
Compares this Short to the Short
passed. | public static Short | decode(String string) Parses the string argument as if it was a short value and returns the
result. | public double | doubleValue() | public boolean | equals(Object object) Compares the argument to the receiver, and answers true if they represent
the same object using a class specific comparison. | public float | floatValue() | public int | hashCode() Answers an integer hash code for the receiver. | public int | intValue() | public long | longValue() | public static short | parseShort(String string) Parses the string argument as if it was a short value and returns the
result. | public static short | parseShort(String string, int radix) Parses the string argument as if it was a short value and returns the
result. | public static short | reverseBytes(short s)
Reverses the bytes of a short .
Parameters: s - The short to reverse. | public short | shortValue() | public String | toString() Answers a string containing a concise, human-readable description of the
receiver. | public static String | toString(short value) Answers a string containing a concise, human-readable description of the
argument.
Parameters: value - short the short to convert. | public static Short | valueOf(String string) Parses the string argument as if it was a short value and returns a Short
representing the result. | public static Short | valueOf(String string, int radix) Parses the string argument as if it was a short value and returns a Short
representing the result. | public static Short | valueOf(short s)
Returns a Short instance for the short
value passed. |
MAX_VALUE | final public static short MAX_VALUE(Code) | |
Constant for the maximum short value, 215-1.
|
MIN_VALUE | final public static short MIN_VALUE(Code) | |
Constant for the minimum short value, -215.
|
SIZE | final public static int SIZE(Code) | |
Constant for the number of bits to represent a short in
two's compliment form.
since: 1.5 |
TYPE | final public static Class<Short> TYPE(Code) | | The java.lang.Class that represents this class.
|
Short | public Short(String string) throws NumberFormatException(Code) | | Constructs a new instance of this class given a string.
Parameters: string - a string representation of a short quantity. exception: NumberFormatException - if the argument could not be parsed as a short quantity. |
Short | public Short(short value)(Code) | | Constructs a new instance of the receiver which represents the short
valued argument.
Parameters: value - the short to store in the new instance. |
byteValue | public byte byteValue()(Code) | | Answers the byte value which the receiver represents
byte the value of the receiver. |
compareTo | public int compareTo(Short object)(Code) | |
Compares this Short to the Short
passed. If this instance's value is equal to the value of the instance
passed, then 0 is returned. If this instance's value is less than the
value of the instance passed, then a negative value is returned. If this
instance's value is greater than the value of the instance passed, then a
positive value is returned.
Parameters: object - The instance to compare to. throws: NullPointerException - if object isnull . since: 1.2 |
decode | public static Short decode(String string) throws NumberFormatException(Code) | | Parses the string argument as if it was a short value and returns the
result. Throws NumberFormatException if the string does not represent an
int quantity. The string may be a hexadecimal ("0x..."), octal ("0..."),
or decimal ("...") representation of a byte.
Parameters: string - a string representation of a short quantity. Short the value represented by the argument exception: NumberFormatException - if the argument could not be parsed as a short quantity. |
doubleValue | public double doubleValue()(Code) | | Answers the double value which the receiver represents
double the value of the receiver. |
equals | public boolean equals(Object object)(Code) | | Compares the argument to the receiver, and answers true if they represent
the same object using a class specific comparison.
In this case, the argument must also be a Short, and the receiver and
argument must represent the same short value.
Parameters: object - the object to compare with this object true if the object is the same as this objectfalse if it is different from this object See Also: Short.hashCode |
floatValue | public float floatValue()(Code) | | Answers the float value which the receiver represents
float the value of the receiver. |
hashCode | public int hashCode()(Code) | | Answers an integer hash code for the receiver. Any two objects which
answer true when passed to equals must
answer the same value for this method.
the receiver's hash See Also: Short.equals |
intValue | public int intValue()(Code) | | Answers the int value which the receiver represents
int the value of the receiver. |
longValue | public long longValue()(Code) | | Answers the long value which the receiver represents
long the value of the receiver. |
parseShort | public static short parseShort(String string) throws NumberFormatException(Code) | | Parses the string argument as if it was a short value and returns the
result. Throws NumberFormatException if the string does not represent an
short quantity.
Parameters: string - a string representation of a short quantity. short the value represented by the argument exception: NumberFormatException - if the argument could not be parsed as a short quantity. |
parseShort | public static short parseShort(String string, int radix) throws NumberFormatException(Code) | | Parses the string argument as if it was a short value and returns the
result. Throws NumberFormatException if the string does not represent a
single short quantity. The second argument specifies the radix to use
when parsing the value.
Parameters: string - a string representation of a short quantity. Parameters: radix - the radix to use when parsing. short the value represented by the argument exception: NumberFormatException - if the argument could not be parsed as a short quantity. |
reverseBytes | public static short reverseBytes(short s)(Code) | |
Reverses the bytes of a short .
Parameters: s - The short to reverse. The reversed value. since: 1.5 |
shortValue | public short shortValue()(Code) | | Answers the short value which the receiver represents
short the value of the receiver. |
toString | public String toString()(Code) | | Answers a string containing a concise, human-readable description of the
receiver.
a printable representation for the receiver. |
toString | public static String toString(short value)(Code) | | Answers a string containing a concise, human-readable description of the
argument.
Parameters: value - short the short to convert. String a printable representation for the short. |
valueOf | public static Short valueOf(String string) throws NumberFormatException(Code) | | Parses the string argument as if it was a short value and returns a Short
representing the result. Throws NumberFormatException if the string does
not represent a single short quantity.
Parameters: string - a string representation of a short quantity. Short the value represented by the argument exception: NumberFormatException - if the argument could not be parsed as a short quantity. |
valueOf | public static Short valueOf(String string, int radix) throws NumberFormatException(Code) | | Parses the string argument as if it was a short value and returns a Short
representing the result. Throws NumberFormatException if the string does
not represent a short quantity. The second argument specifies the radix
to use when parsing the value.
Parameters: string - a string representation of a short quantity. Parameters: radix - the radix to use when parsing. Short the value represented by the argument exception: NumberFormatException - if the argument could not be parsed as a short quantity. |
valueOf | public static Short valueOf(short s)(Code) | |
Returns a Short instance for the short
value passed. This method is preferred over the constructor, as this
method may maintain a cache of instances.
Parameters: s - The short value. A Short instance. since: 1.5 |
|
|
|