public class TransitionBuilder extends Object
| Constructor and Description |
|---|
TransitionBuilder()
Create a new
TransitionBuilder. |
| Modifier and Type | Method and Description |
|---|---|
Transition |
build()
Build a transition instance.
|
<E extends Event> |
eventHandler(EventHandler<E> eventHandler)
Set the event handler of the transition.
|
TransitionBuilder |
eventType(Class<? extends Event> eventType)
Set event type upon which the transition should be triggered.
|
TransitionBuilder |
name(String name)
Set the name of the transition.
|
TransitionBuilder |
sourceState(State sourceState)
Set the source state of the transition.
|
TransitionBuilder |
targetState(State targetState)
Set the target state of the transition.
|
public TransitionBuilder()
TransitionBuilder.public TransitionBuilder name(String name)
name - of the transitionpublic TransitionBuilder sourceState(State sourceState)
sourceState - of the transitionpublic TransitionBuilder targetState(State targetState)
targetState - of the transitionpublic TransitionBuilder eventType(Class<? extends Event> eventType)
eventType - of the transitionpublic <E extends Event> TransitionBuilder eventHandler(EventHandler<E> eventHandler)
eventHandler - of the transitionpublic Transition build()
Copyright © 2020. All rights reserved.