|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ir.utilities.Counter
public class Counter
A simple wrapper data structure for storing an integer count as an Object that can be put into lists, maps, etc. and then incremented and decremented.
Field Summary | |
---|---|
protected int |
count
The integer count |
Constructor Summary | |
---|---|
Counter()
|
Method Summary | |
---|---|
int |
decrement()
Decrement and return the new count |
int |
decrement(int n)
Decrement by n and return the new count |
int |
getValue()
Get the current count |
int |
increment()
Increment and return the new count |
int |
increment(int n)
Increment by n and return the new count |
int |
setValue(int value)
Set the current count |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int count
Constructor Detail |
---|
public Counter()
Method Detail |
---|
public int increment()
public int increment(int n)
public int decrement()
public int decrement(int n)
public int getValue()
public int setValue(int value)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |