Class java.lang.Double
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.17, 18 May 1995
Author:
Lee Boynton, Arthur van Hoff

MAX_VALUE
The maximum value a double can have.
MIN_VALUE
The minimum value a double can have.
NEGATIVE_INFINITY
Negative inifinity.
POSITIVE_INFINITY
Positive inifinity.

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).
isInfinite(double)
Returns true if the number is infinitely large in magnitude.
isInfinite()
Returns true if this double value is infinitely large in magnitude.
isNan(double)
Returns true if the argument is the special Not-a-Number (NaN) value.
isNan()
Returns true if this double value is Not-a-Number (NaN).
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.

POSITIVE_INFINITY
  public final static double POSITIVE_INFINITY
Positive inifinity.
NEGATIVE_INFINITY
  public final static double NEGATIVE_INFINITY
Negative inifinity.
MAX_VALUE
  public final static double MAX_VALUE
The maximum value a double can have.
MIN_VALUE
  public final static double MIN_VALUE
The minimum 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

isNan
  public static boolean isNan(double v)
Returns true if the argument is the special Not-a-Number (NaN) value.
Parameters:
v - the value to be tested
Returns:
true if the value is NaN

isInfinite

  public static boolean isInfinite(double v)
Returns true if the number is infinitely large in magnitude.
Parameters:
v - the value to be tested
Returns:
true if the value is infinitely large in magnitude

isNan

  public boolean isNan()
Returns true if this double value is Not-a-Number (NaN).

isInfinite

  public boolean isInfinite()
Returns true if this double value is infinitely large in magnitude.

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. Note: To be useful in hashtables this method considers two Nan double values to be equal. This is not according to IEEE specification
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