|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Number
org.jboss.util.MuNumber (src)
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(java.lang.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. |
java.lang.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(java.lang.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(java.lang.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. |
java.lang.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(java.lang.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 (src) b)
Swap values with another mutable float. |
java.lang.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(java.lang.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 (src) 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(java.lang.Object obj)
java.lang.ClassCastException
- Object is not a MuFloat.public java.lang.String toString()
public int hashCode()
public boolean equals(java.lang.Object obj)
obj
- Object to test equality with.
public java.lang.Object clone()
public byte byteValue()
byte
value of this object.
byteValue
in class MuNumber (src)
byte
value.public short shortValue()
short
value of this object.
shortValue
in class MuNumber (src)
short
value.public int intValue()
int
value of this object.
intValue
in class MuNumber (src)
int
value.public long longValue()
long
value of this object.
long
value.public float floatValue()
float
value of this object.
floatValue
in class MuNumber (src)
float
value.public double doubleValue()
double
value of this object.
double
value.public void setValue(java.lang.Object obj)
obj
- Object to convert to a float
value.
NotCoercibleException (src)
- Can not convert to float
.public java.lang.Object getValue()
java.lang.Float
value.
|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |