    All Packages    This Package    Previous    Next

# Class java.lang.Double

    java.lang.Object
       |
       +----java.lang.Number
               |
               +----java.lang.Double

public final class Double
extends Number

The Double class is a wrapper for double values.

Version:
  1.13, 31 Jan 1995
Author:
  Lee Boynton, Arthur van Hoff

##

MAX_VALUE
  The minimum value a double can have.
MIN_VALUE
  The maximum value a double can have.

##

Double(double)
  Constructs a wrapper for the given double value.

##

doubleValue()
  Returns the double value.
equals(Object)
  Compares this object against some other object.
floatValue()
  Returns the float value.
hashCode()
  Returns a hashcode for this double.
intValue()
  Returns the integer value of this double (by casting to an int).
longValue()
  Returns the long value of this double (by casting to a long).
toString()
  Returns a string representation of this Double object.
valueOf(String)
  Returns the double that the string represents.

##

MAX_VALUE

      public final static double MAX_VALUE

  The minimum value a double can have.

MIN_VALUE

      public final static double MIN_VALUE

  The maximum value a double can have.

##

Double

      public Double(double value)

  Constructs a wrapper for the given double value.
  Parameters:
    value - the value of the Double

##

toString

      public String toString()

  Returns a string representation of this Double object.
  Overrides:
    toString in class Object

intValue

      public int intValue()

  Returns the integer value of this double (by casting to an int).
  Overrides:
    intValue in class Number

longValue

      public long longValue()

  Returns the long value of this double (by casting to a long).
  Overrides:
    longValue in class Number

floatValue

      public float floatValue()

  Returns the float value.
  Overrides:
    floatValue in class Number

doubleValue

      public double doubleValue()

  Returns the double value.
  Overrides:
    doubleValue in class Number

hashCode

      public int hashCode()

  Returns a hashcode for this double.
  Overrides:
    hashCode in class Object

equals

      public boolean equals(Object obj)

  Compares this object against some other object.
  Parameters:
    obj - the object to compare with
  Returns:
    true if the object is the same
  Overrides:
    equals in class Object

valueOf

      public static Double valueOf(String s)

  Returns the double that the string represents.
  Parameters:
    s - the string to be parsed
  Returns:
    the value of the string
  Throws: NumberFormatException
    The string cannot be parsed.

    All Packages    This Package    Previous    Next