|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrebuild.util.ref.RefNumber
rebuild.util.ref.RefFloat
public final class RefFloat
Reference Float is the same as Float
but allows you to set the float without creating a new RefFloat
.
Field Summary | |
---|---|
static float |
MAX_VALUE
The largest positive finite value of type float. |
static float |
MIN_VALUE
The smallest positive value of type float. |
static float |
NaN
A Not-a-Number (NaN) value of type float. |
static float |
NEGATIVE_INFINITY
The negative infinity of type float. |
static float |
POSITIVE_INFINITY
The positive infinity of type float. |
Fields inherited from class rebuild.util.ref.RefNumber |
---|
_fixed, BIT_SHIFT_LEFT, BIT_SHIFT_LEFT_LOGICAL, BIT_SHIFT_RIGHT, BIT_SHIFT_RIGHT_LOGICAL |
Constructor Summary | |
---|---|
RefFloat()
Create a new RefFloat set to the default of 0f. |
|
RefFloat(float value)
Create a new RefFloat using a float primitive. |
|
RefFloat(java.lang.Float value)
Create a new RefFloat using a Float . |
|
RefFloat(float value,
boolean fixed)
Create a new RefFloat using a float primitive. |
|
RefFloat(java.lang.Float value,
boolean fixed)
Create a new RefFloat using a Float . |
Method Summary | |
---|---|
byte |
byteValue()
Returns the value of this RefFloat as a byte (by casting to a byte). |
RefFloat |
clone()
Create a clone of the current object. |
RefNumber |
cloneNumber()
Create a clone of the current object. |
double |
doubleValue()
Returns The value of this RefFloat object as a double primitive. |
static int |
floatToIntBits(float value)
Returns the bit representation of a single-float value. |
float |
floatValue()
Returns the float value of this RefFloat . |
int |
hashCode()
Returns a hash code for this RefFloat object. |
static float |
intBitsToFloat(int bits)
Returns the single-float corresponding to a given bit representation. |
int |
intValue()
Returns the integer value of this RefFloat (by casting to an int). |
boolean |
isInfinite()
Returns true if this RefFloat value is infinitely large in magnitude. |
static boolean |
isInfinite(float v)
Returns true if the specified number is infinitely large in magnitude. |
boolean |
isNaN()
Returns true if this RefFloat value is the special Not-a-Number (NaN ) value. |
static boolean |
isNaN(float v)
Returns true if the specified number is the special Not-a-Number ( NaN ) value. |
long |
longValue()
Returns the long value of this RefFloat (by casting to a long). |
static float |
parseFloat(java.lang.String s)
Returns a new float initialized to the value represented by the specified String . |
RefFloat |
setValue(float value)
Set the value of this RefFloat object with a float primitive. |
RefFloat |
setValue(java.lang.Float value)
Set the value of this RefFloat object with a Float . |
short |
shortValue()
Returns the value of this RefFloat as a short (by casting to a short). |
java.lang.String |
toString()
Returns a String object representing this RefFloat 's value. |
static java.lang.String |
toString(float d)
Returns a String representation for the specified float value. |
static RefFloat |
valueOf(java.lang.String s)
Returns the floating point value represented by the specified String . |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final float MAX_VALUE
public static final float MIN_VALUE
public static final float NaN
public static final float NEGATIVE_INFINITY
public static final float POSITIVE_INFINITY
Constructor Detail |
---|
public RefFloat()
RefFloat
set to the default of 0f.
public RefFloat(float value)
RefFloat
using a float primitive.
value
- The float primitive to set this RefFloat
with.public RefFloat(float value, boolean fixed)
RefFloat
using a float primitive.
value
- The float primitive to set this RefFloat
with.fixed
- If this item is read only and cannot be modified.public RefFloat(java.lang.Float value)
RefFloat
using a Float
.
value
- The Float
to set this RefFloat
with.public RefFloat(java.lang.Float value, boolean fixed)
RefFloat
using a Float
.
value
- The Float
to set this RefFloat
with.fixed
- If this item is read only and cannot be modified.Method Detail |
---|
public double doubleValue()
RefFloat
object as a double primitive.
public RefFloat setValue(float value)
RefFloat
object with a float primitive.
value
- The primitive float value to set this object.
public RefFloat setValue(java.lang.Float value)
RefFloat
object with a Float
.
value
- The Float
value to set this object.
public int hashCode()
RefFloat
object.
hashCode
in class java.lang.Object
public java.lang.String toString()
String
object representing this RefFloat
's value.
toString
in class java.lang.Object
public byte byteValue()
RefFloat
as a byte (by casting to a byte).
RefFloat
as a byte.public static int floatToIntBits(float value)
value
- A floating-point number.
public float floatValue()
RefFloat
.
public int intValue()
RefFloat
(by casting to an int).
public boolean isInfinite()
RefFloat
value is infinitely large in magnitude.
public static boolean isInfinite(float v)
v
- The value to be tested.
public boolean isNaN()
RefFloat
value is the special Not-a-Number (NaN
) value.
NaN
; false otherwise.public static boolean isNaN(float v)
NaN
) value.
v
- The value to be tested.
NaN
; false otherwise.public static float intBitsToFloat(int bits)
bits
- An integer.
public long longValue()
RefFloat
(by casting to a long).
public static float parseFloat(java.lang.String s)
String
.
s
- The string to be parsed.
java.lang.NumberFormatException
- If the string does not contain a parsable float.public short shortValue()
RefFloat
as a short (by casting to a short).
RefFloat
cast to a short.public static java.lang.String toString(float d)
String
representation for the specified float value.
d
- The float to be converted.
public static RefFloat valueOf(java.lang.String s)
String
.
s
- The string to be parsed.
RefFloat
initialized to the value represented by the String
argument.
java.lang.NumberFormatException
- If the string does not contain a parsable number.public RefFloat clone()
RefFloat
.public RefNumber cloneNumber()
cloneNumber
in class RefNumber
RefFloat
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |