|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Counter
public class Counter
A simple class for counting things
Constructor Summary | |
---|---|
Counter()
This constructor creates and returns a default counter that starts at zero. |
|
Counter(int startCount)
This constructor creates and returns a counter that starts at the specified time. |
Method Summary | |
---|---|
Counter |
createEquivalentCounter()
Creates a brand new Counter that has the same counter as this Counter. |
int |
getCount()
Returns the current count of this counter. |
void |
increment()
Add one to the count. |
void |
reset()
Start the count over at zero |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Counter()
public Counter(int startCount)
startCount
- The number at which the counter startsMethod Detail |
---|
public void increment()
public void reset()
public int getCount()
public Counter createEquivalentCounter()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |