public final class MutableDouble extends java.lang.Number implements java.lang.Comparable<MutableDouble>
Constructor and Description |
---|
MutableDouble() |
MutableDouble(double d) |
MutableDouble(java.lang.Number num) |
Modifier and Type | Method and Description |
---|---|
byte |
byteValue() |
int |
compareTo(MutableDouble anotherMutableDouble)
Compares two
MutableDouble objects numerically. |
double |
doubleValue() |
boolean |
equals(java.lang.Object obj)
Compares this object to the specified object.
|
float |
floatValue() |
int |
hashCode() |
int |
intValue() |
long |
longValue() |
void |
set(double d) |
short |
shortValue() |
java.lang.String |
toString() |
public MutableDouble()
public MutableDouble(double d)
public MutableDouble(java.lang.Number num)
public void set(double d)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
true
if and only if the argument is not
null
and is an MutableDouble
object that
contains the same double
value as this object.
Note that a MutableDouble isn't and can't be equal to an Double.equals
in class java.lang.Object
obj
- the object to compare with.true
if the objects are the same;
false
otherwise.public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(MutableDouble anotherMutableDouble)
MutableDouble
objects numerically.compareTo
in interface java.lang.Comparable<MutableDouble>
anotherMutableDouble
- the MutableDouble
to be
compared.0
if this MutableDouble
is
equal to the argument MutableDouble
; a value less than
0
if this MutableDouble
is numerically less
than the argument MutableDouble
; and a value greater
than 0
if this MutableDouble
is numerically
greater than the argument MutableDouble
(signed
comparison).public int intValue()
intValue
in class java.lang.Number
public long longValue()
longValue
in class java.lang.Number
public short shortValue()
shortValue
in class java.lang.Number
public byte byteValue()
byteValue
in class java.lang.Number
public float floatValue()
floatValue
in class java.lang.Number
public double doubleValue()
doubleValue
in class java.lang.Number