|
SunSPOT API V2.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Double
public final class Double
The Double class provides an object wrapper for Double data values and serves as a place for double-oriented operations. A wrapper is useful because most of Java's utility classes require the use of objects. Since doubles are not objects in Java, they need to be "wrapped" in a Double instance.
| Field Summary | |
|---|---|
static double |
MAX_VALUE
The maximum value a double can have. |
static double |
MIN_VALUE
The minimum value a double can have. |
static double |
NaN
Not-a-Number. |
static double |
NEGATIVE_INFINITY
Negative infinity. |
static double |
POSITIVE_INFINITY
Positive infinity. |
| Constructor Summary | |
|---|---|
Double(double value)
Constructs a Double wrapper for the specified double value. |
|
| Method Summary | |
|---|---|
byte |
byteValue()
Returns the value of this Double as a byte (by casting to a byte). |
static long |
doubleToLongBits(double value)
Returns the bit represention of a double-float value |
double |
doubleValue()
Returns the double value of this Double. |
boolean |
equals(Object obj)
Compares this object against the specified object. |
float |
floatValue()
Returns the float value of this Double. |
int |
hashCode()
Returns a hashcode for this Double. |
int |
intValue()
Returns the integer value of this Double (by casting to an int). |
boolean |
isInfinite()
Returns true if this Double 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 Double 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 represention. |
long |
longValue()
Returns the long value of this Double (by casting to a long). |
static double |
parseDouble(String s)
Returns a new double initialized to the value represented by the specified String, as performed by the valueOf
method of class Double. |
short |
shortValue()
Returns the value of this Double as a short (by casting to a short). |
String |
toString()
Returns a String representation of this Double object. |
static String |
toString(double d)
Returns a String representation for the specified double value. |
static Double |
valueOf(String s)
Returns a new Double value initialized to the value represented by the specified String. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final double MAX_VALUE
public static final double MIN_VALUE
public static final double NEGATIVE_INFINITY
public static final double NaN
public static final double POSITIVE_INFINITY
| Constructor Detail |
|---|
public Double(double value)
value - the initial value of the double| Method Detail |
|---|
public byte byteValue()
public static long doubleToLongBits(double value)
public double doubleValue()
public boolean equals(Object obj)
equals in class Objectobj - the object to compare with
Boolean.hashCode(),
Hashtablepublic float floatValue()
public int hashCode()
hashCode in class ObjectObject.equals(java.lang.Object),
Hashtablepublic int intValue()
public boolean isInfinite()
public static boolean isInfinite(double v)
v - the value to be testedpublic boolean isNaN()
public static boolean isNaN(double v)
v - the value to be testedpublic static double longBitsToDouble(long bits)
public long longValue()
public static double parseDouble(String s)
throws NumberFormatException
String, as performed by the valueOf
method of class Double.
s - the string to be parsed.
NumberFormatException - if the string does not contain a
parsable double.valueOf(String)public short shortValue()
public String toString()
toString in class Objectpublic static String toString(double d)
d - the double to be converted
public static Double valueOf(String s)
throws NumberFormatException
s - the String to be parsed
NumberFormatException - If the String cannot be parsed.
|
SunSPOT API V2.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||