|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Number org.jboss.util.MuNumber org.jboss.util.MuFloat
A mutable float class.
Constructor Summary | |
MuFloat()
Construct a new mutable float. |
|
MuFloat(float f)
Construct a new mutable float. |
|
MuFloat(Object obj)
Construct a new mutable float. |
Method Summary | |
float |
add(float amount)
Add the specified amount. |
byte |
byteValue()
Return the byte value of this object. |
Object |
clone()
Return a cloned copy of this mutable float. |
boolean |
commit(float assumed,
float b)
Set the value to value only if the current value is equal to the assumed value. |
int |
compareTo(float other)
Compares this object with the specified float for order. |
int |
compareTo(Object obj)
Compares this object with the specified object for order. |
float |
divide(float factor)
Divide by the specified factor. |
double |
doubleValue()
Return the double value of this object. |
boolean |
equals(Object obj)
Test the equality of this mutable double with another object. |
float |
floatValue()
Return the float value of this object. |
float |
get()
Get the current value. |
Object |
getValue()
Get the float value of this mutable float. |
int |
hashCode()
Get the hash code for this mutable float. |
int |
intValue()
Return the int value of this object. |
long |
longValue()
Return the long value of this object. |
float |
multiply(float factor)
Multiply by the specified factor. |
float |
negate()
Set the value to the negative of its current value. |
float |
set(float f)
Set the value. |
void |
setValue(Object obj)
Set the value of this mutable float. |
short |
shortValue()
Return the short value of this object. |
float |
subtract(float amount)
Subtract the specified amount. |
float |
swap(MuFloat b)
Swap values with another mutable float. |
String |
toString()
Convert this mutable float to a string. |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MuFloat()
public MuFloat(float f)
f
- float
value.public MuFloat(Object obj)
obj
- Object to convert to a float
value.Method Detail |
public float set(float f)
f
- float
value.
public float get()
public boolean commit(float assumed, float b)
assumed
- The assumed value.b
- The new value.
public float swap(MuFloat b)
b
- Mutable float to swap values with.
public float add(float amount)
amount
- Amount to add.
public float subtract(float amount)
amount
- Amount to subtract.
public float multiply(float factor)
factor
- Factor to multiply by.
public float divide(float factor)
factor
- Factor to divide by.
public float negate()
public int compareTo(float other)
other
- Value to compare with.
public int compareTo(Object obj)
ClassCastException
- Object is not a MuFloat.public String toString()
public int hashCode()
public boolean equals(Object obj)
obj
- Object to test equality with.
public Object clone()
public byte byteValue()
public short shortValue()
short
value of this object.
shortValue
in class MuNumber
short
value.public int intValue()
public long longValue()
long
value of this object.
long
value.public float floatValue()
float
value of this object.
floatValue
in class MuNumber
float
value.public double doubleValue()
double
value of this object.
double
value.public void setValue(Object obj)
obj
- Object to convert to a float
value.
NotCoercibleException
- Can not convert to float
.public Object getValue()
java.lang.Float
value.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |