Save This Page
Home » apache-harmony-6.0-src-r917296-snapshot » java » lang » [javadoc | source]
java.lang
public final class: Double [javadoc | source]
java.lang.Object
   java.lang.Number
      java.lang.Double

All Implemented Interfaces:
    Comparable, Serializable

The wrapper for the primitive type {@code double}.
Field Summary
public static final  double MAX_VALUE    Constant for the maximum {@code double} value, (2 - 2-52) * 21023
public static final  double MIN_VALUE    Constant for the minimum {@code double} value, 2-1074
public static final  double MIN_NORMAL   

Constant for the smallest positive normal value of double.

    since: 1.6 -
 
public static final  double NaN    Constant for the Not-a-Number (NaN) value of the {@code double} type. 
public static final  double POSITIVE_INFINITY    Constant for the Positive Infinity value of the {@code double} type. 
public static final  int MAX_EXPONENT   

Maximum exponent that a finite double variable may have.

    since: 1.6 -
 
public static final  int MIN_EXPONENT   

Minimum exponent that a finite double variable may have.

    since: 1.6 -
 
public static final  double NEGATIVE_INFINITY    Constant for the Negative Infinity value of the {@code double} type. 
public static final  Class<Double> TYPE    The Class object that represents the primitive type {@code double}.
    since: 1.1 -
 
public static final  int SIZE    Constant for the number of bits needed to represent a {@code double} in two's complement form.
    since: 1.5 -
 
Constructor:
 public Double(double value) 
 public Double(String string) throws NumberFormatException 
    Constructs a new {@code Double} from the specified string.
    Parameters:
    string - the string representation of a double value.
    Throws:
    NumberFormatException - if {@code string} can not be decoded into a double value.
    Also see:
    parseDouble(String)
Method from java.lang.Double Summary:
byteValue,   compare,   compareTo,   doubleToLongBits,   doubleToRawLongBits,   doubleValue,   equals,   floatValue,   hashCode,   intValue,   isInfinite,   isInfinite,   isNaN,   isNaN,   longBitsToDouble,   longValue,   parseDouble,   shortValue,   toHexString,   toString,   toString,   valueOf,   valueOf
Methods from java.lang.Number:
byteValue,   doubleValue,   floatValue,   intValue,   longValue,   shortValue
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.lang.Double Detail:
 public byte byteValue() 
 public static int compare(double double1,
    double double2) 
    Compares the two specified double values. There are two special cases:
    • {@code Double.NaN} is equal to {@code Double.NaN} and it is greater than any other double value, including {@code Double.POSITIVE_INFINITY};
    • +0.0d is greater than -0.0d
 public int compareTo(Double object) 
    Compares this object to the specified double object to determine their relative order. There are two special cases:
    • {@code Double.NaN} is equal to {@code Double.NaN} and it is greater than any other double value, including {@code Double.POSITIVE_INFINITY};
    • +0.0d is greater than -0.0d
 public static native long doubleToLongBits(double value)
    Converts the specified double value to a binary representation conforming to the IEEE 754 floating-point double precision bit layout. All Not-a-Number (NaN) values are converted to a single NaN representation ({@code 0x7ff8000000000000L}).
 public static native long doubleToRawLongBits(double value)
    Converts the specified double value to a binary representation conforming to the IEEE 754 floating-point double precision bit layout. Not-a-Number (NaN) values are preserved.
 public double doubleValue() 
    Gets the primitive value of this double.
 public boolean equals(Object object) 
    Compares this object with the specified object and indicates if they are equal. In order to be equal, {@code object} must be an instance of {@code Double} and the bit pattern of its double value is the same as this object's.
 public float floatValue() 
 public int hashCode() 
 public int intValue() 
 public boolean isInfinite() 
    Indicates whether this object represents an infinite value.
 public static boolean isInfinite(double d) 
    Indicates whether the specified double represents an infinite value.
 public boolean isNaN() 
    Indicates whether this object is a Not-a-Number (NaN) value.
 public static boolean isNaN(double d) 
    Indicates whether the specified double is a Not-a-Number (NaN) value.
 public static native double longBitsToDouble(long bits)
    Converts the specified IEEE 754 floating-point double precision bit pattern to a Java double value.
 public long longValue() 
 public static double parseDouble(String string) throws NumberFormatException 
    Parses the specified string as a double value.
 public short shortValue() 
 public static String toHexString(double d) 
    Converts the specified double into its hexadecimal string representation.
 public String toString() 
 public static String toString(double d) 
    Returns a string containing a concise, human-readable description of the specified double value.
 public static Double valueOf(String string) throws NumberFormatException 
    Parses the specified string as a double value.
 public static Double valueOf(double d) 
    Returns a {@code Double} instance for the specified double value.