|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.ObjectCounter
This class is responsible for counter storage and creation.
| Field Summary | |
private java.lang.String |
name
Name of the counter |
private int |
value
This variable symbolizes the value of the counter |
| Constructor Summary | |
Counter()
Creates a new instance of counter |
|
Counter(java.lang.String name)
Creates a new counter with a given name |
|
| Method Summary | |
java.lang.String |
getName()
method to get the name of the counter |
void |
increase()
increase counter by value of 1 |
void |
reset()
reset value of counter to 0 |
int |
stand()
method gives you the current value of the counter |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private int value
private java.lang.String name
| Constructor Detail |
public Counter()
public Counter(java.lang.String name)
name - String with the name of the counter| Method Detail |
public void increase()
public int stand()
public java.lang.String getName()
public void reset()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||