Class ConcurrentFSM<E,​F extends FSM<E>>

  • Type Parameters:
    E - THe type of event that the FSM will be able to process.

    public class ConcurrentFSM<E,​F extends FSM<E>>
    extends FSM<E>
    A concurrent FSM: an FSM that contains multiple FSMs that run concurrently.
    • Constructor Detail

      • ConcurrentFSM

        public ConcurrentFSM​(Set<F> fsms)
        Creates the FSM
        Parameters:
        fsms - The concurrent FSMs.
        Throws:
        IllegalArgumentException - If the number of FSMs is lower than 2.
    • Method Detail

      • getConccurFSMs

        public List<F> getConccurFSMs()
        Returns:
        All the FSMs in an unmodifiable list.
      • process

        public boolean process​(E event)
        Overrides:
        process in class FSM<E>
      • isStarted

        public boolean isStarted()
        Overrides:
        isStarted in class FSM<E>
      • log

        public void log​(boolean log)
        Overrides:
        log in class FSM<E>
      • uninstall

        public void uninstall()
        Overrides:
        uninstall in class FSM<E>