Methods Summary |
---|
public boolean | equals(java.lang.Object obj)Compares this object to the specified object.
if (obj instanceof Short) {
return value == ((Short)obj).shortValue();
}
return false;
|
public int | hashCode()Returns a hashcode for this Short.
return (int)value;
|
public static short | parseShort(java.lang.String s)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.
return parseShort(s, 10);
|
public static short | parseShort(java.lang.String s, int radix)Assuming the specified String represents a short, returns
that short's value. Throws an exception if the String cannot
be parsed as a short.
int i = Integer.parseInt(s, radix);
if (i < MIN_VALUE || i > MAX_VALUE)
throw new NumberFormatException();
return (short)i;
|
public short | shortValue()Returns the value of this Short as a short.
return value;
|
public java.lang.String | toString()Returns a String object representing this Short's value.
return String.valueOf((int)value);
|