|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Number
com.wm.data.MFloat
public class MFloat
This class is a wrapper for float values and is similar to the existing Java wrapper class Float?. However, unlike the Float class, MFloat is mutable, allowing you to change the float value that it wraps.
MBoolean,
MByte,
MDouble,
MInteger,
MLong,
MShort,
Serialized Form| Constructor Summary | |
|---|---|
MFloat(float num)
Constructs an MFloat object and sets it to the specified float value. |
|
MFloat(java.lang.String s)
Constructs an MFloat object and sets it according to the value specified in the String parameter, s. |
|
| Method Summary | |
|---|---|
byte |
byteValue()
Returns the value of this MFloat object as a byte. |
double |
doubleValue()
Returns the value of the MFloat object as a double. |
float |
floatValue()
Returns the value of this MFloat object as a float. |
float |
getValue()
Returns the value of this MFloat object as a float. |
int |
intValue()
Returns the value of this MFloat object as an int. |
long |
longValue()
Returns the value of this MFloat object as a long. |
void |
setValue(float num)
Sets this MFloat object to the specified float value. |
short |
shortValue()
Returns the value of this MFloat object as a short. |
java.lang.String |
toString()
Returns a String representation of this MFloat object's value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MFloat(float num)
num - A float specifying the value to which you want the new MFloat object set.
public MFloat(java.lang.String s)
throws java.lang.NumberFormatException
s - A String specifying the value to which you want the new MFloat object set.
java.lang.NumberFormatException - if s does not contain a String that can be successfully converted to a float value.| Method Detail |
|---|
public void setValue(float num)
num - A float specifying the value to which you want this MFloat object set.public float getValue()
public java.lang.String toString()
toString in class java.lang.Objectpublic byte byteValue()
byteValue in class java.lang.Numberpublic short shortValue()
shortValue in class java.lang.Numberpublic int intValue()
intValue in class java.lang.Numberpublic long longValue()
longValue in class java.lang.Numberpublic float floatValue()
floatValue in class java.lang.Numberpublic double doubleValue()
doubleValue in class java.lang.Number
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||