20.10
java.lang.Double
THE PACKAGE JAVA.LANG
20.10.9
public boolean equals(Object obj)
The result is
true
if and only if the argument is not
null
and is a
Double
object
that represents the same
double
value as this
Double
object. For this purpose,
two
double
values are considered to be the same if and only if the method
doubleToLongBits
( 20.10.21) returns the same
long
value when applied to
each. Note that even though the
==
operator returns
false
if both operands are
NaN, this
equals
method will return
true
if this
Double
object and the argument
are both
Double
objects that represent NaN. On the other hand, even though the
==
operator returns
true
if one operand is positive zero and the other is negative
zero, this
equals
method will return
false
if this
Double
object and the argu
ment represent zeroes of different sign. This allows hashtables to operate properly.
Overrides the
equals
method of
Object
( 20.1.3).
20.10.10
public int hashCode()
The result is the exclusive OR of the two halves of the long integer bit representa
tion, exactly as produced by the method
doubleToLongBits
( 20.10.21), of the
primitive
double
value represented by this
Double
object. That is, the hashcode is
the value of the expression:
(int)(v^(v>>>32))
where
v
is defined by:
long v = Double.doubleToLongBits(this.longValue());
Overrides the
hashCode
method of
Object
( 20.1.4).
20.10.11
public int intValue()
The
double
value represented by this
Double
object is converted ( 5.1.3) to type
int
and the result of the conversion is returned.
Overrides the
intValue
method of
Number
( 20.6.1).
20.10.12
public long longValue()
The
double
value represented by this
Double
object is converted ( 5.1.3) to type
long
and the result of the conversion is returned.
Overrides the
longValue
method of
Number
( 20.6.2).
512
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved