public abstract class AbstractCounter
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
enabled
'Enabled' flag
|
protected BooleanConsumer |
enabler
Enabler lambda; should be alive as long as the time instance
|
| Constructor and Description |
|---|
AbstractCounter() |
| Modifier and Type | Method and Description |
|---|---|
BooleanConsumer |
getEnabler()
Get the 'enabled' flag setter
|
boolean |
isEnabled()
Check if the counter is enabled
|
void |
setEnabled(boolean val)
Enable/disable
|
void |
setEnabler(BooleanConsumer enabler)
Set the 'enabled' flag setter
|
protected BooleanConsumer enabler
protected volatile boolean enabled
public void setEnabled(boolean val)
val - new value of the 'enabled' flagpublic boolean isEnabled()
true if the counter is enabledpublic BooleanConsumer getEnabler()
public void setEnabler(BooleanConsumer enabler)
enabler - the 'enabled' flag setter