public interface Lifecycle<S extends State<S>>
| Modifier and Type | Method and Description |
|---|---|
void |
moveTo(S state)
Transition this lifecycle to a given state.
|
S |
previous()
Returns the state from which this lifecycle transitioned to its current state.
|
S |
state()
Returns the current state of this lifecycle.
|
boolean |
tryMoveTo(S state)
Attempts to transition this lifecycle to a given state, but does not fail if the transition is illegal for this lifecycle.
|
S previous()
S state()
void moveTo(S state)
state - the stateIllegalStateException - if the transition is illegal for this lifecycleboolean tryMoveTo(S state)
state - the statetrue if this lifecycle has transitioned to the given stateCopyright © 2014. All Rights Reserved.