public final class CounterInstance
extends java.lang.Object
CounterGlobal
except that here you have create an instance.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_LIMIT |
Constructor and Description |
---|
CounterInstance() |
CounterInstance(int limit) |
Modifier and Type | Method and Description |
---|---|
boolean |
increment()
Increments the counter.
|
boolean |
isCountable()
Delivers if this counter has any effects on the
increment() method
or not or, in other words: if this instance is a real counter or a dummy. |
boolean |
isFinished()
Returns
true if the counter exceeds its limit otherwise
false . |
void |
reset()
Resets the counter to 1 and the limit to 3.
|
public static final int DEFAULT_LIMIT
public CounterInstance()
public CounterInstance(int limit)
public final void reset()
#reset(int)
public final boolean increment()
true
otherwise false
.public final boolean isFinished()
true
if the counter exceeds its limit otherwise
false
. The counter is not manipulated by this method.public final boolean isCountable()
increment()
method
or not or, in other words: if this instance is a real counter or a dummy.increment()
14-September-2016 18:23 Deutsches Elektronen-Synchrotron DESY in der Helmholtz-Gemeinschaft