Package org.apache.pekko.japi.pf
Class FSMTransitionHandlerBuilder<S>
java.lang.Object
org.apache.pekko.japi.pf.FSMTransitionHandlerBuilder<S>
- Type Parameters:
S- the state type
Builder used to create a partial function for
FSM.onTransition(scala.PartialFunction<scala.Tuple2<S, S>, scala.runtime.BoxedUnit>).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build aPartialFunctionfrom this builder.Add a case statement that matches on a from state and a to state.Add a case statement that matches on a from state and a to state.
-
Constructor Details
-
FSMTransitionHandlerBuilder
public FSMTransitionHandlerBuilder()
-
-
Method Details
-
state
Add a case statement that matches on a from state and a to state.- Parameters:
fromState- the from state to match on, or null for anytoState- the to state to match on, or null for anyapply- an action to apply when the states match- Returns:
- the builder with the case statement added
-
state
Add a case statement that matches on a from state and a to state.- Parameters:
fromState- the from state to match on, or null for anytoState- the to state to match on, or null for anyapply- an action to apply when the states match- Returns:
- the builder with the case statement added
-
build
Build aPartialFunctionfrom this builder. After this call the builder will be reset.- Returns:
- a PartialFunction for this builder.
-