Class FSMStateFunctionBuilder<S,​D,​E>

    • Constructor Detail

      • FSMStateFunctionBuilder

        public FSMStateFunctionBuilder()
        Deprecated.
    • Method Detail

      • event

        public final <P,​Q> FSMStateFunctionBuilder<S,​D,​E> event​(java.lang.Class<P> eventType,
                                                                                  java.lang.Class<Q> dataType,
                                                                                  FI.TypedPredicate2<P,​Q> predicate,
                                                                                  FI.Apply2<P,​Q,​PersistentFSM.State<S,​D,​E>> apply)
        Deprecated.
        Add a case statement that matches on an event and data type and a predicate.
        Type Parameters:
        P - the event type to match on
        Q - the data type to match on
        Parameters:
        eventType - the event type to match on
        dataType - the data type to match on
        predicate - a predicate to evaluate on the matched types
        apply - an action to apply to the event and state data if there is a match
        Returns:
        the builder with the case statement added
      • event

        public <P,​Q> FSMStateFunctionBuilder<S,​D,​E> event​(java.lang.Class<P> eventType,
                                                                            java.lang.Class<Q> dataType,
                                                                            FI.Apply2<P,​Q,​PersistentFSM.State<S,​D,​E>> apply)
        Deprecated.
        Add a case statement that matches on an event and data type.
        Type Parameters:
        P - the event type to match on
        Q - the data type to match on
        Parameters:
        eventType - the event type to match on
        dataType - the data type to match on
        apply - an action to apply to the event and state data if there is a match
        Returns:
        the builder with the case statement added
      • event

        public <P> FSMStateFunctionBuilder<S,​D,​E> event​(java.lang.Class<P> eventType,
                                                                    FI.TypedPredicate2<P,​D> predicate,
                                                                    FI.Apply2<P,​D,​PersistentFSM.State<S,​D,​E>> apply)
        Deprecated.
        Add a case statement that matches if the event type and predicate matches.
        Parameters:
        eventType - the event type to match on
        predicate - a predicate that will be evaluated on the data and the event
        apply - an action to apply to the event and state data if there is a match
        Returns:
        the builder with the case statement added
      • event

        public <P> FSMStateFunctionBuilder<S,​D,​E> event​(java.lang.Class<P> eventType,
                                                                    FI.Apply2<P,​D,​PersistentFSM.State<S,​D,​E>> apply)
        Deprecated.
        Add a case statement that matches if the event type and predicate matches.
        Parameters:
        eventType - the event type to match on
        apply - an action to apply to the event and state data if there is a match
        Returns:
        the builder with the case statement added
      • event

        public FSMStateFunctionBuilder<S,​D,​E> event​(FI.TypedPredicate2<java.lang.Object,​D> predicate,
                                                                FI.Apply2<java.lang.Object,​D,​PersistentFSM.State<S,​D,​E>> apply)
        Deprecated.
        Add a case statement that matches if the predicate matches.
        Parameters:
        predicate - a predicate that will be evaluated on the data and the event
        apply - an action to apply to the event and state data if there is a match
        Returns:
        the builder with the case statement added
      • event

        public <Q> FSMStateFunctionBuilder<S,​D,​E> event​(java.util.List<java.lang.Object> eventMatches,
                                                                    java.lang.Class<Q> dataType,
                                                                    FI.Apply2<java.lang.Object,​Q,​PersistentFSM.State<S,​D,​E>> apply)
        Deprecated.
        Add a case statement that matches on the data type and if any of the event types in the list match or any of the event instances in the list compares equal.
        Type Parameters:
        Q - the data type to match on
        Parameters:
        eventMatches - a list of types or instances to match against
        dataType - the data type to match on
        apply - an action to apply to the event and state data if there is a match
        Returns:
        the builder with the case statement added
      • event

        public FSMStateFunctionBuilder<S,​D,​E> event​(java.util.List<java.lang.Object> eventMatches,
                                                                FI.Apply2<java.lang.Object,​D,​PersistentFSM.State<S,​D,​E>> apply)
        Deprecated.
        Add a case statement that matches if any of the event types in the list match or any of the event instances in the list compares equal.
        Parameters:
        eventMatches - a list of types or instances to match against
        apply - an action to apply to the event and state data if there is a match
        Returns:
        the builder with the case statement added
      • eventEquals

        public <P,​Q> FSMStateFunctionBuilder<S,​D,​E> eventEquals​(P event,
                                                                                  java.lang.Class<Q> dataType,
                                                                                  FI.Apply2<P,​Q,​PersistentFSM.State<S,​D,​E>> apply)
        Deprecated.
        Add a case statement that matches on the data type and if the event compares equal.
        Type Parameters:
        Q - the data type to match on
        Parameters:
        event - an event to compare equal against
        dataType - the data type to match on
        apply - an action to apply to the event and state data if there is a match
        Returns:
        the builder with the case statement added
      • eventEquals

        public <P> FSMStateFunctionBuilder<S,​D,​E> eventEquals​(P event,
                                                                          FI.Apply2<P,​D,​PersistentFSM.State<S,​D,​E>> apply)
        Deprecated.
        Add a case statement that matches if event compares equal.
        Parameters:
        event - an event to compare equal against
        apply - an action to apply to the event and state data if there is a match
        Returns:
        the builder with the case statement added
      • anyEvent

        public FSMStateFunctionBuilder<S,​D,​E> anyEvent​(FI.Apply2<java.lang.Object,​D,​PersistentFSM.State<S,​D,​E>> apply)
        Deprecated.
        Add a case statement that matches on any type of event.
        Parameters:
        apply - an action to apply to the event and state data
        Returns:
        the builder with the case statement added
      • build

        public scala.PartialFunction<PersistentFSM.Event<D>,​PersistentFSM.State<S,​D,​E>> build()
        Deprecated.
        Build a PartialFunction from this builder. After this call the builder will be reset.
        Returns:
        a PartialFunction for this builder.