|
|||||||||
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
public final class 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. |
double |
doubleValue()
|
boolean |
equals(java.lang.Object obj)
Compares this object to the specified object. |
float |
floatValue()
|
int |
hashCode()
|
void |
incValue(int val)
Add the argument to the value of this integer. |
int |
intValue()
|
long |
longValue()
|
void |
set(int i)
|
short |
shortValue()
|
java.lang.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()
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 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.
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(MutableInteger anotherMutableInteger)
MutableInteger
objects numerically.
compareTo
in interface java.lang.Comparable<MutableInteger>
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 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
public void incValue(int val)
val
- Value to be added to this integer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |