|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Number java.lang.Double
public final class Double
Minimal Double implementation.
Field Summary | |
---|---|
static double |
NaN
|
static double |
NEGATIVE_INFINITY
|
static double |
POSITIVE_INFINITY
|
static int |
SIZE
|
Constructor Summary | |
---|---|
Double(double val)
|
|
Double(String val)
|
Method Summary | |
---|---|
byte |
byteValue()
Return the byte value of this Number. |
static long |
doubleToLongBits(double value)
Returns the bit representation of a double-float value. |
static long |
doubleToRawLongBits(double d)
Returns the bit representation of a double-float value. |
double |
doubleValue()
Return the double value of this Number. |
boolean |
equals(Object o)
|
float |
floatValue()
Return the float value of this Number. |
int |
hashCode()
|
int |
intValue()
Return the int value of this Number. |
boolean |
isInfinite()
|
static boolean |
isInfinite(double v)
|
boolean |
isNaN()
|
static boolean |
isNaN(double val)
|
static double |
longBitsToDouble(long l)
Returns the double-float corresponding to a given bit representation. |
long |
longValue()
Return the long value of this Number. |
static double |
parseDouble(String s)
Converts a String value into a double. |
short |
shortValue()
Return the short value of this Number. |
String |
toString()
|
static String |
toString(double d)
Convert a double to a String |
static Double |
valueOf(double d)
|
static Double |
valueOf(String s)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final double POSITIVE_INFINITY
public static final double NEGATIVE_INFINITY
public static final double NaN
public static final int SIZE
Constructor Detail |
---|
public Double(double val)
public Double(String val)
Method Detail |
---|
public byte byteValue()
Number
byteValue
in class Number
public double doubleValue()
Number
doubleValue
in class Number
public boolean equals(Object o)
equals
in class Object
public float floatValue()
Number
floatValue
in class Number
public int hashCode()
hashCode
in class Object
public int intValue()
Number
intValue
in class Number
public boolean isInfinite()
public static boolean isInfinite(double v)
public boolean isNaN()
public static boolean isNaN(double val)
public long longValue()
Number
longValue
in class Number
public static double parseDouble(String s) throws NumberFormatException
s
- String representation of the floating point number
NumberFormatException
public short shortValue()
Number
shortValue
in class Number
public String toString()
toString
in class Object
public static String toString(double d)
d
- the double to be converted
public static Double valueOf(double d)
public static Double valueOf(String s)
public static long doubleToRawLongBits(double d)
0x7ff0000000000000
.
0xfff0000000000000
.
If the argument is NaN, the result is the integer representing the actual NaN value.
longBitsToDouble(long)
method, will produce a floating-point
value equal to the argument to doubleToRawLongBits
.
d
- a floating-point number.
public static long doubleToLongBits(double value)
doubleToRawLongBits
this
method does collapse all NaN values into a standard single value. This
value is 0x7ff8000000000000
.
value
- a floating-point number.
public static double longBitsToDouble(long l)
If the argument is 0x7ff0000000000000
, the result is positive
infinity.
If the argument is 0xfff0000000000000
, the result is negative
infinity.
If the argument is any value in the range 0x7ff0000000000001L through
0x7fffffffffffffffL or in the range 0xfff0000000000001L through
0xffffffffffffffffL, the result is a NaN.
All IEEE 754 NaN values of type float
are, in effect,
lumped together by the Java programming language into a single
double
value called NaN. Distinct values of NaN are only
accessible by use of the Double.doubleToRawLongBits
method.
l
- a long.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |