Java java.lang Double fields, constructors, methods, implement or subclass

Example usage for Java java.lang Double fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.lang Double.

The text is from its open source code.

Field

doublePOSITIVE_INFINITY
A constant holding the positive infinity of type double .
doubleNEGATIVE_INFINITY
A constant holding the negative infinity of type double .
doubleNaN
A constant holding a Not-a-Number (NaN) value of type double .
doubleMAX_VALUE
A constant holding the largest positive finite value of type double , (2-2-52)·21023.
doubleMIN_NORMAL
A constant holding the smallest positive normal value of type double , 2-1022.
doubleMIN_VALUE
A constant holding the smallest positive nonzero value of type double , 2-1074.
intMAX_EXPONENT
Maximum exponent a finite double variable may have.
intMIN_EXPONENT
Minimum exponent a normalized double variable may have.
intSIZE
The number of bits used to represent a double value.
intBYTES
The number of bytes used to represent a double value.
ClassTYPE
The Class instance representing the primitive type double .

Constructor

Double(double value)
Constructs a newly allocated Double object that represents the primitive double argument.
Double(String s)
Constructs a newly allocated Double object that represents the floating-point value of type double represented by the string.

Method

bytebyteValue()
Returns the value of this Double as a byte after a narrowing primitive conversion.
intcompare(double d1, double d2)
Compares the two specified double values.
intcompareTo(Double anotherDouble)
Compares two Double objects numerically.
longdoubleToLongBits(double value)
Returns a representation of the specified floating-point value according to the IEEE 754 floating-point "double format" bit layout.
longdoubleToRawLongBits(double value)
Returns a representation of the specified floating-point value according to the IEEE 754 floating-point "double format" bit layout, preserving Not-a-Number (NaN) values.
doubledoubleValue()
Returns the double value of this Double object.
booleanequals(Object obj)
Compares this object against the specified object.
floatfloatValue()
Returns the value of this Double as a float after a narrowing primitive conversion.
ClassgetClass()
Returns the runtime class of this Object .
inthashCode()
Returns a hash code for this Double object.
inthashCode(double value)
Returns a hash code for a double value; compatible with Double.hashCode() .
intintValue()
Returns the value of this Double as an int after a narrowing primitive conversion.
booleanisFinite(double d)
Returns true if the argument is a finite floating-point value; returns false otherwise (for NaN and infinity arguments).
booleanisInfinite()
Returns true if this Double value is infinitely large in magnitude, false otherwise.
booleanisInfinite(double v)
Returns true if the specified number is infinitely large in magnitude, false otherwise.
booleanisNaN()
Returns true if this Double value is a Not-a-Number (NaN), false otherwise.
booleanisNaN(double v)
Returns true if the specified number is a Not-a-Number (NaN) value, false otherwise.
doublelongBitsToDouble(long bits)
Returns the double value corresponding to a given bit representation.
longlongValue()
Returns the value of this Double as a long after a narrowing primitive conversion.
doublemax(double a, double b)
Returns the greater of two double values as if by calling Math#max(double,double) Math.max .
doublemin(double a, double b)
Returns the smaller of two double values as if by calling Math#min(double,double) Math.min .
doubleparseDouble(String s)
Returns a new double initialized to the value represented by the specified String , as performed by the valueOf method of class Double .
shortshortValue()
Returns the value of this Double as a short after a narrowing primitive conversion.
doublesum(double a, double b)
Adds two double values together as per the + operator.
StringtoHexString(double d)
Returns a hexadecimal string representation of the double argument.
StringtoString()
Returns a string representation of this Double object.
StringtoString(double d)
Returns a string representation of the double argument.
DoublevalueOf(String s)
Returns a Double object holding the double value represented by the argument string s .
DoublevalueOf(double d)
Returns a Double instance representing the specified double value.