|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--Counter
A Counter is an object that counts integer values. It provides services to be reset, to be incremented and to retrieve its value
| Constructor Summary | |
Counter()
Constructs a counter with default value (0) and step (1). |
|
Counter(int v)
Constructs a counter providing a start value and a default step (1). |
|
Counter(int v,
int s)
Constructs a counter providing a start value and a specific step. |
|
| Method Summary | |
void |
dec()
Decrements the counter value. |
void |
dec(int n)
Decrements the counter value |
boolean |
equals(Counter x)
Tests if two counters are equal. |
int |
getStep()
Gets the counter step value. |
int |
getValue()
Gets the counter value. |
void |
inc()
Increments the counter value. |
void |
inc(int n)
Increments the counter value |
void |
reset()
Resets the counter value. |
void |
setLimits(int mi,
int ma)
Set the limits of the caunter, min e max. |
void |
setStep(int s)
Set the counter step value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Counter()
public Counter(int v)
public Counter(int v,
int s)
| Method Detail |
public void reset()
public void inc()
public void inc(int n)
n - amount of the increment.
The counter counts from min to max.public void dec()
public void dec(int n)
n - amount of the decrement.
The counter counts from min to max.public int getValue()
public int getStep()
public boolean equals(Counter x)
public void setStep(int s)
public void setLimits(int mi,
int ma)
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||