public class StateConfiguration<S,T>
extends java.lang.Object
| Constructor and Description |
|---|
StateConfiguration(StateRepresentation<S,T> representation,
Func2<S,StateRepresentation<S,T>> lookup) |
| Modifier and Type | Method and Description |
|---|---|
StateConfiguration<S,T> |
ignore(T trigger)
ignore the specified trigger when in the configured state
|
StateConfiguration<S,T> |
ignoreIf(T trigger,
FuncBoolean guard)
ignore the specified trigger when in the configured state, if the guard returns true
|
StateConfiguration<S,T> |
onEntry(Action entryAction)
Specify an action that will execute when transitioning into the configured state
|
StateConfiguration<S,T> |
onEntry(Action1<Transition<S,T>> entryAction)
Specify an action that will execute when transitioning into the configured state
|
StateConfiguration<S,T> |
onEntryFrom(T trigger,
Action entryAction)
Specify an action that will execute when transitioning into the configured state
|
StateConfiguration<S,T> |
onEntryFrom(T trigger,
Action1<Transition<S,T>> entryAction)
Specify an action that will execute when transitioning into the configured state
|
<TArg0> StateConfiguration<S,T> |
onEntryFrom(TriggerWithParameters1<TArg0,S,T> trigger,
Action1<TArg0> entryAction,
java.lang.Class<TArg0> classe0)
Specify an action that will execute when transitioning into the configured state
|
<TArg0> StateConfiguration<S,T> |
onEntryFrom(TriggerWithParameters1<TArg0,S,T> trigger,
Action2<TArg0,Transition<S,T>> entryAction,
java.lang.Class<TArg0> classe0)
Specify an action that will execute when transitioning into the configured state
|
<TArg0,TArg1> |
onEntryFrom(TriggerWithParameters2<TArg0,TArg1,S,T> trigger,
Action2<TArg0,TArg1> entryAction,
java.lang.Class<TArg0> classe0,
java.lang.Class<TArg1> classe1)
Specify an action that will execute when transitioning into the configured state
|
<TArg0,TArg1> |
onEntryFrom(TriggerWithParameters2<TArg0,TArg1,S,T> trigger,
Action3<TArg0,TArg1,Transition<S,T>> entryAction,
java.lang.Class<TArg0> classe0,
java.lang.Class<TArg1> classe1)
Specify an action that will execute when transitioning into the configured state
|
<TArg0,TArg1,TArg2> |
onEntryFrom(TriggerWithParameters3<TArg0,TArg1,TArg2,S,T> trigger,
Action3<TArg0,TArg1,TArg2> entryAction,
java.lang.Class<TArg0> classe0,
java.lang.Class<TArg1> classe1,
java.lang.Class<TArg2> classe2)
Specify an action that will execute when transitioning into the configured state
|
<TArg0,TArg1,TArg2> |
onEntryFrom(TriggerWithParameters3<TArg0,TArg1,TArg2,S,T> trigger,
Action4<TArg0,TArg1,TArg2,Transition<S,T>> entryAction,
java.lang.Class<TArg0> classe0,
java.lang.Class<TArg1> classe1,
java.lang.Class<TArg2> classe2)
Specify an action that will execute when transitioning into the configured state
|
StateConfiguration<S,T> |
onExit(Action exitAction)
Specify an action that will execute when transitioning from the configured state
|
StateConfiguration<S,T> |
onExit(Action1<Transition<S,T>> exitAction)
Specify an action that will execute when transitioning from the configured state
|
StateConfiguration<S,T> |
permit(T trigger,
S destinationState)
Accept the specified trigger and transition to the destination state
|
StateConfiguration<S,T> |
permitDynamic(T trigger,
Func<S> destinationStateSelector)
Accept the specified trigger and transition to the destination state, calculated dynamically by the supplied
function
|
<TArg0> StateConfiguration<S,T> |
permitDynamic(TriggerWithParameters1<TArg0,S,T> trigger,
Func2<TArg0,S> destinationStateSelector)
Accept the specified trigger and transition to the destination state, calculated dynamically by the supplied
function
|
<TArg0,TArg1> |
permitDynamic(TriggerWithParameters2<TArg0,TArg1,S,T> trigger,
Func3<TArg0,TArg1,S> destinationStateSelector)
Accept the specified trigger and transition to the destination state, calculated dynamically by the supplied
function
|
<TArg0,TArg1,TArg2> |
permitDynamic(TriggerWithParameters3<TArg0,TArg1,TArg2,S,T> trigger,
Func4<TArg0,TArg1,TArg2,S> destinationStateSelector)
Accept the specified trigger and transition to the destination state, calculated dynamically by the supplied
function
|
StateConfiguration<S,T> |
permitDynamicIf(T trigger,
Func<S> destinationStateSelector,
FuncBoolean guard)
Accept the specified trigger and transition to the destination state, calculated dynamically by the supplied
function
|
<TArg0> StateConfiguration<S,T> |
permitDynamicIf(TriggerWithParameters1<TArg0,S,T> trigger,
Func2<TArg0,S> destinationStateSelector,
FuncBoolean guard)
Accept the specified trigger and transition to the destination state, calculated dynamically by the supplied
function
|
<TArg0,TArg1> |
permitDynamicIf(TriggerWithParameters2<TArg0,TArg1,S,T> trigger,
Func3<TArg0,TArg1,S> destinationStateSelector,
FuncBoolean guard)
Accept the specified trigger and transition to the destination state, calculated dynamically by the supplied
function
|
<TArg0,TArg1,TArg2> |
permitDynamicIf(TriggerWithParameters3<TArg0,TArg1,TArg2,S,T> trigger,
Func4<TArg0,TArg1,TArg2,S> destinationStateSelector,
FuncBoolean guard)
Accept the specified trigger and transition to the destination state, calculated dynamically by the supplied
function
|
StateConfiguration<S,T> |
permitIf(T trigger,
S destinationState,
FuncBoolean guard)
Accept the specified trigger and transition to the destination state
|
StateConfiguration<S,T> |
permitReentry(T trigger)
Accept the specified trigger, execute exit actions and re-execute entry actions.
|
StateConfiguration<S,T> |
permitReentryIf(T trigger,
FuncBoolean guard)
Accept the specified trigger, execute exit actions and re-execute entry actions.
|
StateConfiguration<S,T> |
substateOf(S superstate)
Sets the superstate that the configured state is a substate of
|
public StateConfiguration(StateRepresentation<S,T> representation, Func2<S,StateRepresentation<S,T>> lookup)
public StateConfiguration<S,T> permit(T trigger, S destinationState)
trigger - The accepted triggerdestinationState - The state that the trigger will cause a transition topublic StateConfiguration<S,T> permitIf(T trigger, S destinationState, FuncBoolean guard)
trigger - The accepted triggerdestinationState - The state that the trigger will cause a transition toguard - Function that must return true in order for the trigger to be acceptedpublic StateConfiguration<S,T> permitReentry(T trigger)
Applies to the current state only. Will not re-execute superstate actions, or cause actions to execute transitioning between super- and sub-states
trigger - The accepted triggerpublic StateConfiguration<S,T> permitReentryIf(T trigger, FuncBoolean guard)
Applies to the current state only. Will not re-execute superstate actions, or cause actions to execute transitioning between super- and sub-states
trigger - The accepted triggerguard - Function that must return true in order for the trigger to be acceptedpublic StateConfiguration<S,T> ignore(T trigger)
trigger - The trigger to ignorepublic StateConfiguration<S,T> ignoreIf(T trigger, FuncBoolean guard)
trigger - The trigger to ignoreguard - Function that must return true in order for the trigger to be ignoredpublic StateConfiguration<S,T> onEntry(Action entryAction)
entryAction - Action to executepublic StateConfiguration<S,T> onEntry(Action1<Transition<S,T>> entryAction)
entryAction - Action to execute, providing details of the transitionpublic StateConfiguration<S,T> onEntryFrom(T trigger, Action entryAction)
trigger - The trigger by which the state must be entered in order for the action to executeentryAction - Action to executepublic StateConfiguration<S,T> onEntryFrom(T trigger, Action1<Transition<S,T>> entryAction)
trigger - The trigger by which the state must be entered in order for the action to executeentryAction - Action to execute, providing details of the transitionpublic <TArg0> StateConfiguration<S,T> onEntryFrom(TriggerWithParameters1<TArg0,S,T> trigger, Action1<TArg0> entryAction, java.lang.Class<TArg0> classe0)
TArg0 - Type of the first trigger argumenttrigger - The trigger by which the state must be entered in order for the action to executeentryAction - Action to execute, providing details of the transitionclasse0 - Class argumentpublic <TArg0> StateConfiguration<S,T> onEntryFrom(TriggerWithParameters1<TArg0,S,T> trigger, Action2<TArg0,Transition<S,T>> entryAction, java.lang.Class<TArg0> classe0)
TArg0 - Type of the first trigger argumenttrigger - The trigger by which the state must be entered in order for the action to executeentryAction - Action to execute, providing details of the transitionclasse0 - Class argumentpublic <TArg0,TArg1> StateConfiguration<S,T> onEntryFrom(TriggerWithParameters2<TArg0,TArg1,S,T> trigger, Action2<TArg0,TArg1> entryAction, java.lang.Class<TArg0> classe0, java.lang.Class<TArg1> classe1)
TArg0 - Type of the first trigger argumentTArg1 - Type of the second trigger argumenttrigger - The trigger by which the state must be entered in order for the action to executeentryAction - Action to execute, providing details of the transitionclasse0 - Class argumentclasse1 - Class argumentpublic <TArg0,TArg1> StateConfiguration<S,T> onEntryFrom(TriggerWithParameters2<TArg0,TArg1,S,T> trigger, Action3<TArg0,TArg1,Transition<S,T>> entryAction, java.lang.Class<TArg0> classe0, java.lang.Class<TArg1> classe1)
TArg0 - Type of the first trigger argumentTArg1 - Type of the second trigger argumenttrigger - The trigger by which the state must be entered in order for the action to executeentryAction - Action to execute, providing details of the transitionclasse0 - Class argumentclasse1 - Class argumentpublic <TArg0,TArg1,TArg2> StateConfiguration<S,T> onEntryFrom(TriggerWithParameters3<TArg0,TArg1,TArg2,S,T> trigger, Action3<TArg0,TArg1,TArg2> entryAction, java.lang.Class<TArg0> classe0, java.lang.Class<TArg1> classe1, java.lang.Class<TArg2> classe2)
TArg0 - Type of the first trigger argumentTArg1 - Type of the second trigger argumentTArg2 - Type of the third trigger argumenttrigger - The trigger by which the state must be entered in order for the action to executeentryAction - Action to execute, providing details of the transitionclasse0 - Class argumentclasse1 - Class argumentclasse2 - Class argumentpublic <TArg0,TArg1,TArg2> StateConfiguration<S,T> onEntryFrom(TriggerWithParameters3<TArg0,TArg1,TArg2,S,T> trigger, Action4<TArg0,TArg1,TArg2,Transition<S,T>> entryAction, java.lang.Class<TArg0> classe0, java.lang.Class<TArg1> classe1, java.lang.Class<TArg2> classe2)
TArg0 - Type of the first trigger argumentTArg1 - Type of the second trigger argumentTArg2 - Type of the third trigger argumenttrigger - The trigger by which the state must be entered in order for the action to executeentryAction - Action to execute, providing details of the transitionclasse0 - Class argumentclasse1 - Class argumentclasse2 - Class argumentpublic StateConfiguration<S,T> onExit(Action exitAction)
exitAction - Action to executepublic StateConfiguration<S,T> onExit(Action1<Transition<S,T>> exitAction)
exitAction - Action to executepublic StateConfiguration<S,T> substateOf(S superstate)
Substates inherit the allowed transitions of their superstate. When entering directly into a substate from outside of the superstate, entry actions for the superstate are executed. Likewise when leaving from the substate to outside the supserstate, exit actions for the superstate will execute.
superstate - The superstatepublic StateConfiguration<S,T> permitDynamic(T trigger, Func<S> destinationStateSelector)
trigger - The accepted triggerdestinationStateSelector - Function to calculate the state that the trigger will cause a transition topublic <TArg0> StateConfiguration<S,T> permitDynamic(TriggerWithParameters1<TArg0,S,T> trigger, Func2<TArg0,S> destinationStateSelector)
TArg0 - Type of the first trigger argumenttrigger - The accepted triggerdestinationStateSelector - Function to calculate the state that the trigger will cause a transition topublic <TArg0,TArg1> StateConfiguration<S,T> permitDynamic(TriggerWithParameters2<TArg0,TArg1,S,T> trigger, Func3<TArg0,TArg1,S> destinationStateSelector)
TArg0 - Type of the first trigger argumentTArg1 - Type of the second trigger argumenttrigger - The accepted triggerdestinationStateSelector - Function to calculate the state that the trigger will cause a transition topublic <TArg0,TArg1,TArg2> StateConfiguration<S,T> permitDynamic(TriggerWithParameters3<TArg0,TArg1,TArg2,S,T> trigger, Func4<TArg0,TArg1,TArg2,S> destinationStateSelector)
TArg0 - Type of the first trigger argumentTArg1 - Type of the second trigger argumentTArg2 - Type of the third trigger argumenttrigger - The accepted triggerdestinationStateSelector - Function to calculate the state that the trigger will cause a transition topublic StateConfiguration<S,T> permitDynamicIf(T trigger, Func<S> destinationStateSelector, FuncBoolean guard)
trigger - The accepted triggerdestinationStateSelector - Function to calculate the state that the trigger will cause a transition toguard - Function that must return true in order for the trigger to be acceptedpublic <TArg0> StateConfiguration<S,T> permitDynamicIf(TriggerWithParameters1<TArg0,S,T> trigger, Func2<TArg0,S> destinationStateSelector, FuncBoolean guard)
TArg0 - Type of the first trigger argumenttrigger - The accepted triggerdestinationStateSelector - Function to calculate the state that the trigger will cause a transition toguard - Function that must return true in order for the trigger to be acceptedpublic <TArg0,TArg1> StateConfiguration<S,T> permitDynamicIf(TriggerWithParameters2<TArg0,TArg1,S,T> trigger, Func3<TArg0,TArg1,S> destinationStateSelector, FuncBoolean guard)
TArg0 - Type of the first trigger argumentTArg1 - Type of the second trigger argumenttrigger - The accepted triggerdestinationStateSelector - Function to calculate the state that the trigger will cause a transition toguard - Function that must return true in order for the trigger to be acceptedpublic <TArg0,TArg1,TArg2> StateConfiguration<S,T> permitDynamicIf(TriggerWithParameters3<TArg0,TArg1,TArg2,S,T> trigger, Func4<TArg0,TArg1,TArg2,S> destinationStateSelector, FuncBoolean guard)
TArg0 - Type of the first trigger argumentTArg1 - Type of the second trigger argumentTArg2 - Type of the third trigger argumenttrigger - The accepted triggerdestinationStateSelector - Function to calculate the state that the trigger will cause a transition toguard - Function that must return true in order for the trigger to be acceptedCopyright © 2014. All Rights Reserved.