Package io.hektor.fsm.impl
Class TransitionImpl<E,S extends Enum<S>,C extends Context,D extends Data>
java.lang.Object
io.hektor.fsm.impl.TransitionImpl<E,S,C,D>
- All Implemented Interfaces:
Transition<E,S, C, D>
public class TransitionImpl<E,S extends Enum<S>,C extends Context,D extends Data>
extends Object
implements Transition<E,S,C,D>
- Author:
- jonas@jonasborjesson.com
-
Constructor Summary
ConstructorsConstructorDescriptionTransitionImpl(String description, S to, Class<E> event, Predicate<E> guard, Guard<E, C, D> richerGuard, Consumer<E> action, Action<E, C, D> statefulAction, Function<E, ?> transformation) TransitionImpl(String description, S to, Class<E> event, Predicate<E> guard, Guard<E, C, D> richerGuard, Optional<Label> guardLabel, Consumer<E> action, Action<E, C, D> statefulAction, Optional<Label> actionLabel, Function<E, ?> transformation, Optional<Label> transformationLabel) -
Method Summary
Modifier and TypeMethodDescriptionvoidacceptVisitor(FsmVisitor<S, C, D> visitor) Get the associated action wih this transition, if it exists.ThisTransitionrepresents the transition to this particular state.Get the transformation associated with thisTransition.booleanSee if the given event is matching this transition.
-
Constructor Details
-
TransitionImpl
-
TransitionImpl
-
-
Method Details
-
match
Description copied from interface:TransitionSee if the given event is matching this transition. -
getToState
Description copied from interface:TransitionThisTransitionrepresents the transition to this particular state. Assuming the event matches of course.- Specified by:
getToStatein interfaceTransition<E,S extends Enum<S>, C extends Context, D extends Data> - Returns:
- the to state
-
getGuardLabel
- Specified by:
getGuardLabelin interfaceTransition<E,S extends Enum<S>, C extends Context, D extends Data>
-
getAction
Description copied from interface:TransitionGet the associated action wih this transition, if it exists. -
getStatefulAction
- Specified by:
getStatefulActionin interfaceTransition<E,S extends Enum<S>, C extends Context, D extends Data>
-
getActionLabel
- Specified by:
getActionLabelin interfaceTransition<E,S extends Enum<S>, C extends Context, D extends Data>
-
getEventType
- Specified by:
getEventTypein interfaceTransition<E,S extends Enum<S>, C extends Context, D extends Data>
-
getTransformation
Description copied from interface:TransitionGet the transformation associated with thisTransition. A transformation may only exists if this is a transition out of a transient state.- Specified by:
getTransformationin interfaceTransition<E,S extends Enum<S>, C extends Context, D extends Data> - Returns:
- the optional transformation for a
Transitionout of a transient state.
-
getTransformationLabel
- Specified by:
getTransformationLabelin interfaceTransition<E,S extends Enum<S>, C extends Context, D extends Data>
-
acceptVisitor
- Specified by:
acceptVisitorin interfaceTransition<E,S extends Enum<S>, C extends Context, D extends Data>
-