| Constructor and Description |
|---|
Machine(List<Task> tasks)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
State |
getState()
Returns current state of this machine.
|
protected abstract boolean |
isAllowed(Transition transition)
Checks if given
transition is allowed. |
protected abstract boolean |
isFinishing(Transition transition)
Checks if given
transition is an finishing condition. |
protected abstract boolean |
isStarting(Transition transition)
Checks if given
transition is a starting condition. |
void |
setState(State state)
Sets state.
|
public final State getState()
public final void setState(State state) throws FSMException
state - new stateFSMException - if an error occurs.protected abstract boolean isStarting(Transition transition)
transition is a starting condition.
Default implementation always returns true. Override this
method if customizations are needed.transition - transition to checktransition is a starting condition;
false otherwise.protected abstract boolean isAllowed(Transition transition)
transition is allowed. Default
implementation always returns true. Override this method if
customizations are needed.transition - transition to check.transition is allowed; false if not
allowed.protected abstract boolean isFinishing(Transition transition)
transition is an finishing condition.
Default implementation always returns false. Override this
method if customizations are needed.transition - transition to checktransition is a finishing condition;
false otherwise.Copyright © 2011-2012. All Rights Reserved.