|
||||||||||
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.RefDouble
public final class RefDouble
Reference Double is the same as Double
but allows you to set the double without creating a new Double
.
Field Summary | |
---|---|
static double |
MAX_VALUE
The largest positive finite value of type double. |
static double |
MIN_VALUE
The smallest positive value of type double. |
static double |
NaN
A Not-a-Number (NaN) value of type double. |
static double |
NEGATIVE_INFINITY
The negative infinity of type double. |
static double |
POSITIVE_INFINITY
The positive infinity of type double. |
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 | |
---|---|
RefDouble()
Create a new RefDouble set to the default of 0.0. |
|
RefDouble(double value)
Create a new RefDouble using a double primitive. |
|
RefDouble(java.lang.Double value)
Create a new RefDouble using a Double . |
|
RefDouble(double value,
boolean fixed)
Create a new RefDouble using a double primitive. |
|
RefDouble(java.lang.Double value,
boolean fixed)
Create a new RefDouble using a Double . |
Method Summary | |
---|---|
byte |
byteValue()
Returns the value of this RefDouble as a byte (by casting to a byte). |
RefDouble |
clone()
Create a clone of the current object. |
RefNumber |
cloneNumber()
Create a clone of the current object. |
static long |
doubleToLongBits(double value)
Returns a representation of the specified floating-point value according to the IEEE 754 floating-point "double format" bit layout. |
double |
doubleValue()
Returns The value of this RefDouble object as a double primitive. |
float |
floatValue()
Returns the float value of this RefDouble . |
int |
hashCode()
Returns a hash code for this RefDouble object. |
int |
intValue()
Returns the integer value of this RefDouble (by casting to an int). |
boolean |
isInfinite()
Returns true if this RefDouble value is infinitely large in magnitude. |
static boolean |
isInfinite(double v)
Returns true if the specified number is infinitely large in magnitude. |
boolean |
isNaN()
Returns true if this RefDouble value is the special Not-a-Number (NaN ) value. |
static boolean |
isNaN(double v)
Returns true if the specified number is the special Not-a-Number ( NaN ) value. |
static double |
longBitsToDouble(long bits)
Returns the double-float corresponding to a given bit representation. |
long |
longValue()
Returns the long value of this RefDouble (by casting to a long). |
static double |
parseDouble(java.lang.String s)
Returns a new double initialized to the value represented by the specified String , as performed by the valueOf method of class RefDouble . |
RefDouble |
setValue(double value)
Set the value of this RefDouble object with a double primitive. |
RefDouble |
setValue(java.lang.Double value)
Set the value of this RefDouble object with a Double . |
short |
shortValue()
Returns the value of this RefDouble as a short (by casting to a short). |
java.lang.String |
toString()
Returns a String object representing this RefDouble 's value. |
static java.lang.String |
toString(double d)
Creates a string representation of the double argument. |
static RefDouble |
valueOf(java.lang.String s)
Returns a new RefDouble object initialized to the 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 double MAX_VALUE
public static final double MIN_VALUE
public static final double NaN
public static final double NEGATIVE_INFINITY
public static final double POSITIVE_INFINITY
Constructor Detail |
---|
public RefDouble()
RefDouble
set to the default of 0.0.
public RefDouble(double value)
RefDouble
using a double primitive.
value
- The double primitive to set this RefDouble
with.public RefDouble(double value, boolean fixed)
RefDouble
using a double primitive.
value
- The double primitive to set this RefDouble
with.fixed
- If this item is read only and cannot be modified.public RefDouble(java.lang.Double value)
RefDouble
using a Double
.
value
- The Double
to set this RefDouble
with.public RefDouble(java.lang.Double value, boolean fixed)
RefDouble
using a Double
.
value
- The Double
to set this RefDouble
with.fixed
- If this item is read only and cannot be modified.Method Detail |
---|
public double doubleValue()
RefDouble
object as a double primitive.
public RefDouble setValue(double value)
RefDouble
object with a double primitive.
value
- The primitive double value to set this object.
public RefDouble setValue(java.lang.Double value)
RefDouble
object with a Double
.
value
- The Double
value to set this object.
public int hashCode()
RefDouble
object.
hashCode
in class java.lang.Object
public java.lang.String toString()
String
object representing this RefDouble
's value.
toString
in class java.lang.Object
public byte byteValue()
RefDouble
as a byte (by casting to a byte).
RefDouble
as a byte.public static long doubleToLongBits(double value)
value
- A double precision floating-point number.
public float floatValue()
RefDouble
.
public int intValue()
RefDouble
(by casting to an int).
public boolean isInfinite()
RefDouble
value is infinitely large in magnitude.
public static boolean isInfinite(double v)
v
- The value to be tested.
public boolean isNaN()
RefDouble
value is the special Not-a-Number (NaN
) value.
NaN
; false otherwise.public static boolean isNaN(double v)
NaN
) value.
v
- The value to be tested.
NaN
; false otherwise.public static double longBitsToDouble(long bits)
bits
- Any long integer.
public long longValue()
RefDouble
(by casting to a long).
public static double parseDouble(java.lang.String s)
String
, as performed by the valueOf
method of class RefDouble
.
s
- The string to be parsed.
java.lang.NumberFormatException
- If the string does not contain a parsable double.public short shortValue()
RefDouble
as a short (by casting to a short).
RefDouble
cast to a short.public static java.lang.String toString(double d)
d
- The double to be converted.
public static RefDouble valueOf(java.lang.String s)
RefDouble
object initialized to the value represented by the specified string.
s
- The string to be parsed.
RefDouble
initialized to the value represented by the string argument.
java.lang.NumberFormatException
- If the string does not contain a parsable number.public RefDouble clone()
RefDouble
.public RefNumber cloneNumber()
cloneNumber
in class RefNumber
RefDouble
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |