|
||||||||||
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.MutableInteger
A class for Integer objects that you can change.
Constructor Summary | |
MutableInteger()
|
|
MutableInteger(int i)
|
Method Summary | |
byte |
byteValue()
|
int |
compareTo(MutableInteger anotherMutableInteger)
Compares two MutableInteger objects numerically. |
int |
compareTo(Object o)
Compares this MutableInteger 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(int i)
|
short |
shortValue()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MutableInteger()
public MutableInteger(int i)
Method Detail |
public void set(int i)
public int hashCode()
public boolean equals(Object obj)
true
if and only if the argument is not
null
and is an MutableInteger
object that
contains the same int
value as this object.
Note that a MutableInteger isn't and can't be equal to an Integer.
obj
- the object to compare with.
true
if the objects are the same;
false
otherwise.public String toString()
public int compareTo(MutableInteger anotherMutableInteger)
MutableInteger
objects numerically.
anotherMutableInteger
- the MutableInteger
to be
compared.
0
if this MutableInteger
is
equal to the argument MutableInteger
; a value less than
0
if this MutableInteger
is numerically less
than the argument MutableInteger
; and a value greater
than 0
if this MutableInteger
is numerically
greater than the argument MutableInteger
(signed
comparison).public int compareTo(Object o)
MutableInteger
object to another object.
If the object is an MutableInteger
, this function behaves
like compareTo(MutableInteger)
. Otherwise, it throws a
ClassCastException
(as MutableInteger
objects are only comparable to other MutableInteger
objects).
compareTo
in interface Comparable
o
- the Object
to be compared.
ClassCastException
- if the argument is not an
MutableInteger
.Comparable
public int intValue()
public long longValue()
public short shortValue()
public byte byteValue()
public float floatValue()
public double doubleValue()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |