Package com.tangosol.util.fsm
Class Transition<S extends Enum<S>>
java.lang.Object
com.tangosol.util.fsm.Transition<S>
- Type Parameters:
S- the type of the state of theFiniteStateMachine
A
Transition represents a transition in a FiniteStateMachine from one
or more possible states to a desired state.- Since:
- Coherence 12.2.1
- Author:
- Brian Oliver
-
Constructor Summary
ConstructorsConstructorDescriptionTransition(String sName, EnumSet<S> statesFrom, S stateTo) Constructs aTransition(without anTransitionAction).Transition(String sName, EnumSet<S> statesFrom, S stateTo, TransitionAction<S> action) Constructs aTransition.Transition(String sName, S stateFrom, S stateTo) Constructs aTransition(without anTransitionAction).Transition(String sName, S stateFrom, S stateTo, TransitionAction<S> action) Constructs aTransition. -
Method Summary
Modifier and TypeMethodDescriptionObtains theTransitionActionto be performed for theTransition.Obtains the state to which theFiniteStateMachinewill be in once thisTransitionhas occurred.getName()Obtains the name of theTransition.booleanisStartingState(S state) Determines if the specified state is one of the possible starting states for theTransition.toString()
-
Constructor Details
-
Transition
Constructs aTransition(without anTransitionAction).- Parameters:
sName- the name of theTransition(used for display and logging purposes)statesFrom- the set of states from which thisTransitionmay occurstateTo- the state once theTransitionActionhas been successfully performed
-
Transition
Constructs aTransition(without anTransitionAction).- Parameters:
sName- the name of theTransition(used for display and logging purposes)stateFrom- the state from which thisTransitionmay occurstateTo- the state once theTransitionActionhas been successfully performed
-
Transition
Constructs aTransition.- Parameters:
sName- the name of theTransition(used for display and logging purposes)statesFrom- the set of states from which thisTransitionmay occurstateTo- the state once theTransitionActionhas been successfully performedaction- theTransitionActionto be perform for theTransition
-
Transition
Constructs aTransition.- Parameters:
sName- the name of theTransition(used for display and logging purposes)stateFrom- the state from which thisTransitionmay occurstateTo- the state once theTransitionActionhas been successfully performedaction- theTransitionActionto be perform for theTransition
-
-
Method Details
-
getName
Obtains the name of theTransition.- Returns:
- the name of the
Transition
-
isStartingState
Determines if the specified state is one of the possible starting states for theTransition.- Parameters:
state- the state to check- Returns:
trueif the specified state is one of the starting states for theTransition
-
getAction
Obtains theTransitionActionto be performed for theTransition.- Returns:
- the
TransitionActionfor the transition
-
getEndingState
Obtains the state to which theFiniteStateMachinewill be in once thisTransitionhas occurred.- Returns:
- the state of the
FiniteStateMachineafter thisTransitionhas occurred
-
toString
-