All Packages Class Hierarchy This Package Previous Next Index
Class java.lang.Short
java.lang.Object
|
+----java.lang.Number
|
+----java.lang.Short
- public final class Short
- extends Number
The Short class is the standard wrapper for short values.
- See Also:
- Number
-
MAX_VALUE
- The maximum value a Short can have.
-
MIN_VALUE
- The minimum value a Short can have.
-
TYPE
- The Class object representing the primitive type short.
-
Short(short)
- Constructs a Short object initialized to the specified short value.
-
Short(String)
- Constructs a Short object initialized to the value specified by the
String parameter.
-
byteValue()
- Returns the value of this Short as a byte.
-
decode(String)
- Decodes a String into a Short.
-
doubleValue()
- Returns the value of this Short as a double.
-
equals(Object)
- Compares this object to the specified object.
-
floatValue()
- Returns the value of this Short as a float.
-
hashCode()
- Returns a hashcode for this Short.
-
intValue()
- Returns the value of this Short as an int.
-
longValue()
- Returns the value of this Short as a long.
-
parseShort(String)
- Assuming the specified String represents a short, returns
that short's value.
-
parseShort(String, int)
- Assuming the specified String represents a short, returns
that short's value.
-
shortValue()
- Returns the value of this Short as a short.
-
toString()
- Returns a String object representing this Short's value.
-
toString(short)
- Returns a new String object representing the specified
Short.
-
valueOf(String)
- Assuming the specified String represents a short, returns a
new Short object initialized to that value.
-
valueOf(String, int)
- Assuming the specified String represents a short, returns a
new Short object initialized to that value.
MIN_VALUE
Properties Public Constant
MIN_VALUE=short
- The minimum value a Short can have.
MAX_VALUE
Properties Public Constant
MAX_VALUE=short
- The maximum value a Short can have.
TYPE
Properties Public Constant
TYPE=Class
- The Class object representing the primitive type short.
Short
method Short(value=short) public
- Constructs a Short object initialized to the specified short value.
- Parameters:
- value - the initial value of the Short
Short
method Short(s=String) public Signals NumberFormatException
- Constructs a Short object initialized to the value specified by the
String parameter. The radix is assumed to be 10.
- Parameters:
- s - the String to be converted to a Short
- Throws: NumberFormatException
- If the String does not
contain a parsable short.
toString
method toString(s=short) returns String public static
- Returns a new String object representing the specified
Short. The radix is assumed to be 10.
- Parameters:
- s - the short to be converted
parseShort
method parseShort(s=String) returns short public static Signals NumberFormatException
- Assuming the specified String represents a short, returns
that short's value. Throws an exception if the String cannot
be parsed as a short. The radix is assumed to be 10.
- Parameters:
- s - the String containing the short
- Throws: NumberFormatException
- If the string does not
contain a parsable short.
parseShort
method parseShort(s=String, -
radix=int) returns short public static Signals NumberFormatException
- Assuming the specified String represents a short, returns
that short's value. Throws an exception if the String cannot
be parsed as a short.
- Parameters:
- s - the String containing the short
- radix - the radix to be used
- Throws: NumberFormatException
- If the String does not
contain a parsable short.
valueOf
method valueOf(s=String, -
radix=int) returns Short public static Signals NumberFormatException
- Assuming the specified String represents a short, returns a
new Short object initialized to that value. Throws an
exception if the String cannot be parsed as a short.
- Parameters:
- s - the String containing the integer
- radix - the radix to be used
- Throws: NumberFormatException
- If the String does not
contain a parsable short.
valueOf
method valueOf(s=String) returns Short public static Signals NumberFormatException
- Assuming the specified String represents a short, returns a
new Short object initialized to that value. Throws an
exception if the String cannot be parsed as a short.
- Parameters:
- s - the String containing the integer
- Throws: NumberFormatException
- If the String does not
contain a parsable short.
decode
method decode(nm=String) returns Short public static Signals NumberFormatException
- Decodes a String into a Short. The String may represent
decimal, hexadecimal, and octal numbers.
- Parameters:
- nm - the string to decode
byteValue
method byteValue() returns byte public
- Returns the value of this Short as a byte.
- Overrides:
- byteValue in class Number
shortValue
method shortValue() returns short public
- Returns the value of this Short as a short.
- Overrides:
- shortValue in class Number
intValue
method intValue() returns int public
- Returns the value of this Short as an int.
- Overrides:
- intValue in class Number
longValue
method longValue() returns long public
- Returns the value of this Short as a long.
- Overrides:
- longValue in class Number
floatValue
method floatValue() returns float public
- Returns the value of this Short as a float.
- Overrides:
- floatValue in class Number
doubleValue
method doubleValue() returns double public
- Returns the value of this Short as a double.
- Overrides:
- doubleValue in class Number
toString
method toString() returns String public
- Returns a String object representing this Short's value.
- Overrides:
- toString in class Object
hashCode
method hashCode() returns int public
- Returns a hashcode for this Short.
- Overrides:
- hashCode in class Object
equals
method equals(obj=Object) returns boolean public
- Compares this object to the specified object.
- Parameters:
- obj - the object to compare with
- Returns:
- true if the objects are the same; false otherwise.
- Overrides:
- equals in class Object
All Packages Class Hierarchy This Package Previous Next Index