|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Number
edu.stanford.nlp.util.MutableDouble
public final class MutableDouble
A class for Double objects that you can change.
| Constructor Summary | |
|---|---|
MutableDouble()
|
|
MutableDouble(double d)
|
|
| Method Summary | |
|---|---|
byte |
byteValue()
|
int |
compareTo(MutableDouble anotherMutableDouble)
Compares two MutableDouble objects numerically. |
int |
compareTo(Object o)
Compares this MutableDouble object to another object. |
double |
doubleValue()
|
boolean |
equals(Object obj)
Compares this object to the specified object. |
float |
floatValue()
|
int |
hashCode()
|
int |
intValue()
|
long |
longValue()
|
void |
set(double d)
|
short |
shortValue()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MutableDouble()
public MutableDouble(double d)
| Method Detail |
|---|
public void set(double d)
public int hashCode()
hashCode in class Objectpublic boolean equals(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 Objectobj - the object to compare with.
true if the objects are the same;
false otherwise.public String toString()
toString in class Objectpublic int compareTo(MutableDouble anotherMutableDouble)
MutableDouble objects numerically.
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 compareTo(Object o)
MutableDouble object to another object.
If the object is an MutableDouble, this function behaves
like compareTo(MutableDouble). Otherwise, it throws a
ClassCastException (as MutableDouble
objects are only comparable to other MutableDouble
objects).
compareTo in interface Comparableo - the Object to be compared.
ClassCastException - if the argument is not an
MutableDouble.Comparablepublic int intValue()
intValue in class Numberpublic long longValue()
longValue in class Numberpublic short shortValue()
shortValue in class Numberpublic byte byteValue()
byteValue in class Numberpublic float floatValue()
floatValue in class Numberpublic double doubleValue()
doubleValue in class Number
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||