public class MDouble
extends java.lang.Number
Constructor and Description |
---|
MDouble(double num)
Constructs an MDouble object and sets it to the specified double value.
|
MDouble(java.lang.String s)
Constructs an MDouble 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 MDouble object as a byte.
|
double |
doubleValue()
Returns the value of the MDouble object as a double.
|
float |
floatValue()
Returns the value of the MDouble object as a float.
|
double |
getValue()
Returns the value of this MDouble object as a double.
|
int |
intValue()
Returns the value of the MDouble object as an int.
|
long |
longValue()
Returns the value of the MDouble object as a long.
|
void |
setValue(double num)
Sets this MDouble object to the specified double value.
|
short |
shortValue()
Returns the value of this MDouble object as a short.
|
java.lang.String |
toString()
Returns a String representation of this MDouble object's value.
|
public MDouble(double num)
num
- A double specifying the value to which you want the new MDouble object set.public MDouble(java.lang.String s) throws java.lang.NumberFormatException
s
- A String specifying the value to which you want the new MDouble object set.java.lang.NumberFormatException
- If s does not contain a String that can be successfully converted to a double value.public void setValue(double num)
num
- A double specifying the value to which you want this MDouble object set.public double 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