public class MShort
extends java.lang.Number
Constructor and Description |
---|
MShort(short num)
Constructs an MShort object and sets it to the specified short value.
|
MShort(java.lang.String s)
Constructs an MShort object and sets it according to the value specified in the String parameter, s.
|
Modifier and Type | Method and Description |
---|---|
byte |
byteValue()
Returns the value of this MShort object as a byte.
|
double |
doubleValue()
Returns the value of this MShort object as a double.
|
float |
floatValue()
Returns the value of this MShort object as a float.
|
short |
getValue()
Returns the value of this MShort object as a short.
|
int |
intValue()
Returns the value of this MShort object as an int.
|
long |
longValue()
Returns the value of this MShort object as a long.
|
void |
setValue(short num)
Sets this MShort object to the specified short value.
|
short |
shortValue()
Returns the value of this MShort object as a short.
|
java.lang.String |
toString()
Returns a String representation of this MShort object's value.
|
public MShort(short num)
num
- A short that specifies the value of the new MShort object.public MShort(java.lang.String s) throws java.lang.NumberFormatException
s
- A String that specifies the value of the new MShort object.java.lang.NumberFormatException
- If s does not contain a String that can be successfully converted to a short value.public void setValue(short num)
num
- A short specifying the value to which this MShort object is to be set.public short getValue()
public java.lang.String toString()
toString
in class java.lang.Object
public byte byteValue()
byteValue
in class java.lang.Number
public short shortValue()
shortValue
in class java.lang.Number
public int intValue()
intValue
in class java.lang.Number
public long longValue()
longValue
in class java.lang.Number
public float floatValue()
floatValue
in class java.lang.Number
public double doubleValue()
doubleValue
in class java.lang.Number