Class EventHandlerBuilderByState$


  • public class EventHandlerBuilderByState$
    extends java.lang.Object
    • Constructor Detail

      • EventHandlerBuilderByState$

        public EventHandlerBuilderByState$()
    • Method Detail

      • builder

        public <S extends State,​State,​Event> EventHandlerBuilderByState<S,​State,​Event> builder​(java.lang.Class<S> stateClass)
        Parameters:
        stateClass - The handlers defined by this builder are used when the state is an instance of the stateClass
        Returns:
        A new, mutable, EventHandlerBuilderByState
      • builder

        public <State,​Event> EventHandlerBuilderByState<State,​State,​Event> builder​(java.util.function.Predicate<State> statePredicate)
        Parameters:
        statePredicate - The handlers defined by this builder are used when the statePredicate is true, useful for example when state type is an Optional
        Returns:
        A new, mutable, EventHandlerBuilderByState