java.lang
Class Double

java.lang.Object
  |
  +--java.lang.Number
        |
        +--java.lang.Double
All Implemented Interfaces:
Comparable, java.io.Serializable

public final synchronized class Double
extends Number
implements Comparable


Field Summary
static double MAX_VALUE
           
static double MIN_VALUE
           
static double NaN
           
static double NEGATIVE_INFINITY
           
static double POSITIVE_INFINITY
           
static Class TYPE
           
 
Constructor Summary
Double(double)
           
Double(String)
           
 
Method Summary
 byte byteValue()
           
static int compare(double, double)
           
 int compareTo(Double)
           
 int compareTo(Object)
           
static long doubleToLongBits(double)
           
static long doubleToRawLongBits(double)
           
 double doubleValue()
           
 boolean equals(Object)
          Determines if this object is "equal" to another object.
 float floatValue()
           
 int hashCode()
           
 int intValue()
           
 boolean isInfinite()
           
static boolean isInfinite(double)
           
 boolean isNaN()
           
static boolean isNaN(double)
           
static double longBitsToDouble(long)
           
 long longValue()
           
static double parseDouble(String)
           
 short shortValue()
           
 String toString()
           
static String toString(double)
           
static Double valueOf(String)
           
 

Field Detail

POSITIVE_INFINITY

public static final double POSITIVE_INFINITY

NEGATIVE_INFINITY

public static final double NEGATIVE_INFINITY

NaN

public static final double NaN

MAX_VALUE

public static final double MAX_VALUE

MIN_VALUE

public static final double MIN_VALUE

TYPE

public static final Class TYPE
Constructor Detail

Double

public Double(double)

Double

public Double(String)
       throws NumberFormatException
Method Detail

toString

public static String toString(double)

valueOf

public static Double valueOf(String)
                      throws NumberFormatException

parseDouble

public static double parseDouble(String)
                          throws NumberFormatException

isNaN

public static boolean isNaN(double)

isInfinite

public static boolean isInfinite(double)

isNaN

public boolean isNaN()

isInfinite

public boolean isInfinite()

toString

public String toString()
Overrides:
toString in class Object

byteValue

public byte byteValue()
Overrides:
byteValue in class Number

shortValue

public short shortValue()
Overrides:
shortValue in class Number

intValue

public int intValue()
Specified by:
intValue in class Number

longValue

public long longValue()
Specified by:
longValue in class Number

floatValue

public float floatValue()
Specified by:
floatValue in class Number

doubleValue

public double doubleValue()
Specified by:
doubleValue in class Number

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object)
Description copied from class: Object
Determines if this object is "equal" to another object.

In general, objects should be instances of the same class with the same guts to be considered equal. For example, the code below only prints same value since s and t are different strings though they have the same value: "hello".

 String s = new String("hello");
 String t = new String("hello");
 if (s.equals(t)) System.out.println("same value");
 if (s == t) System.out.println("same string");

 

Overrides:
equals in class Object
Following copied from class: java.lang.Object
Parameters:
is - the other Object to which this one is compared
Returns:
true if this Object is equal to other

doubleToLongBits

public static long doubleToLongBits(double)

doubleToRawLongBits

public static long doubleToRawLongBits(double)

longBitsToDouble

public static double longBitsToDouble(long)

compareTo

public int compareTo(Double)

compareTo

public int compareTo(Object)
Specified by:
compareTo in interface Comparable

compare

public static int compare(double,
                          double)