|
Parsing Engine | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdanbikel.util.IntCounter
public class IntCounter
A class to hold an int that may be incremented or decremented.
| Constructor Summary | |
|---|---|
IntCounter()
Constructs an IntCounter with an initial value of zero. |
|
IntCounter(int count)
Constructs an IntCounter with the specified initial value. |
|
| Method Summary | |
|---|---|
int |
compareTo(Object obj)
|
boolean |
equals(Object obj)
Returns true if the specified object is an instance of
IntCounter and if its count is the same as that of
this IntCounter object, false otherwise. |
int |
get()
Gets the current count. |
int |
hashCode()
|
int |
increment()
Increments this counter by 1, returning the previous count (postincrement). |
void |
increment(int n)
Increments this counter by the specified integer. |
void |
set(int count)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IntCounter()
IntCounter with an initial value of zero.
public IntCounter(int count)
IntCounter with the specified initial value.
| Method Detail |
|---|
public final int increment()
public final void increment(int n)
n.
public final int get()
public final void set(int count)
public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
true if the specified object is an instance of
IntCounter and if its count is the same as that of
this IntCounter object, false otherwise.
equals in class Objectobj - the object to compare with this object
true if the specified object is an instance of
IntCounter and if its count is the same as that of
this IntCounter object, false otherwisepublic String toString()
toString in class Objectpublic int compareTo(Object obj)
compareTo in interface Comparable
|
Parsing Engine | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||