Package com.tnsai.fsm
Class Transition.Builder
java.lang.Object
com.tnsai.fsm.Transition.Builder
- Enclosing class:
Transition
Full builder for Transition.
-
Method Summary
Modifier and TypeMethodDescriptionaction(TransitionAction action) Sets the transition action.build()Builds the transition.priority(int priority) Sets the priority (higher = more preferred).Sets the guard condition.
-
Method Details
-
when
Sets the guard condition.- Parameters:
guard- the guard- Returns:
- this builder
-
action
Sets the transition action.- Parameters:
action- the action- Returns:
- this builder
-
priority
Sets the priority (higher = more preferred).- Parameters:
priority- the priority- Returns:
- this builder
-
build
Builds the transition.- Returns:
- new transition
-