public class ActivationLifeCycle
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
boolean |
addStateTransition(ActivationState from,
EventType event,
ActivationState to)
Extends the life cycle with a new transition that is created
from the given state, labeled with the given event and leading
to the given state.
|
boolean |
containsFrom(ActivationState state)
Check that the life-cycle contains a transition from the given state.
|
boolean |
containsTo(ActivationState state)
Check that the life-cycle contains a transition to the given state.
|
static ActivationLifeCycle |
copyOf(ActivationLifeCycle lifeCycle)
Creates a complete copy of the life-cycle
|
static ActivationLifeCycle |
create(ActivationState inactiveState) |
ActivationState |
getInactiveState() |
com.google.common.collect.Table<ActivationState,EventType,ActivationState> |
getStateTransitionTable()
Returns a copy of the transition table.
|
ActivationState |
nextActivationState(ActivationState currentState,
EventType event)
Returns the state in the life cycle that is defined as the next state
from the given current state in response to the given event.
|
java.lang.String |
toString() |
public ActivationState nextActivationState(ActivationState currentState, EventType event)
currentState
- the current state of the activationevent
- the event that causes the state transitionpublic boolean addStateTransition(ActivationState from, EventType event, ActivationState to)
from
- the source state of the transitionevent
- the event causing the transitionto
- the target state of the transitionpublic boolean containsFrom(ActivationState state)
state
- public boolean containsTo(ActivationState state)
state
- public static ActivationLifeCycle copyOf(ActivationLifeCycle lifeCycle)
lifeCycle
- the life-cycée to be copiedpublic static ActivationLifeCycle create(ActivationState inactiveState)
public com.google.common.collect.Table<ActivationState,EventType,ActivationState> getStateTransitionTable()
public ActivationState getInactiveState()
public java.lang.String toString()
toString
in class java.lang.Object