|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Counter
Class that implements a simple counter.
Constructor Summary | |
Counter()
Initializes the counter to 1 |
|
Counter(int val)
Initializes the counter to the given value |
Method Summary | |
void |
increment()
Increments the counter. |
java.lang.String |
toString()
Returns string containing value. |
int |
value()
Gets the value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Counter()
public Counter(int val)
Method Detail |
public void increment()
public int value()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |