public abstract class TimerAction extends Object
Provides for a chain of actions to be defined that will execute upon the
timer being stopped. Each action should be non-destructive in that it should
not change the attributes of the Timer
.
Modifier and Type | Field and Description |
---|---|
protected TimerAction |
nextAction |
Constructor and Description |
---|
TimerAction() |
Modifier and Type | Method and Description |
---|---|
TimerAction |
addAction(TimerAction action)
Add the provided action to the chain of actions to perform.
|
protected abstract void |
processTimer(Timer timer)
Perform any applicable processing specific to the actions.
|
protected void |
reset()
Perform any processing specific to the action for reset.
|
void |
resetState()
Drives the reset processing for all
TimerAction instances. |
void |
timerComplete(Timer timer) |
protected TimerAction nextAction
public final TimerAction addAction(TimerAction action)
No guarantee as to the order in which the actions will be executed.
action
- new action to add to chain. Cannot be null.public final void timerComplete(Timer timer)
protected abstract void processTimer(Timer timer)
Concrete classes must override this method in order to view the submitted timers.
timer
- an instance of a completed Timer
.protected void reset()
Concrete classes should override this method if they accumulate timer data that is specific to a given run. The default is to do nothing.
public final void resetState()
TimerAction
instances.Copyright © 2014. All Rights Reserved.