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
ConstructorDescriptionTransition
(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 theTransitionAction
to be performed for theTransition
.Obtains the state to which theFiniteStateMachine
will be in once thisTransition
has occurred.getName()
Obtains the name of theTransition
.boolean
isStartingState
(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 thisTransition
may occurstateTo
- the state once theTransitionAction
has 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 thisTransition
may occurstateTo
- the state once theTransitionAction
has 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 thisTransition
may occurstateTo
- the state once theTransitionAction
has been successfully performedaction
- theTransitionAction
to be perform for theTransition
-
Transition
Constructs aTransition
.- Parameters:
sName
- the name of theTransition
(used for display and logging purposes)stateFrom
- the state from which thisTransition
may occurstateTo
- the state once theTransitionAction
has been successfully performedaction
- theTransitionAction
to 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:
true
if the specified state is one of the starting states for theTransition
-
getAction
Obtains theTransitionAction
to be performed for theTransition
.- Returns:
- the
TransitionAction
for the transition
-
getEndingState
Obtains the state to which theFiniteStateMachine
will be in once thisTransition
has occurred.- Returns:
- the state of the
FiniteStateMachine
after thisTransition
has occurred
-
toString
-