Interface SUL<I,​O>

    • Method Detail

      • pre

        void pre()
        setup SUL.
      • post

        void post()
        shut down SUL.
      • step

        O step​(I in)
        make one step on the SUL.
        in - input to the SUL
        output of SUL
        SULException - if the input symbol cannot be executed on the SUL
      • canFork

        default boolean canFork()
        Returns whether this SUL is capable of forking.
        true if this SUL can be forked, false otherwise
        See Also:
      • fork

        default SUL<I,​O> fork()
        Forks this SUL, if possible. The fork of a SUL is a copy which behaves exactly the same as this SUL. This method should always return a reseted SUL, regardless of whether this call is made between a call to pre() and post().

        If canFork() returns true, this method must return a non-null object, which should behave exactly like this SUL (in particular, it must be forkable as well). Otherwise, a UnsupportedOperationException must be thrown.

        Implementation note: if resetting a SUL changes the internal state of this object in a non-trivial way (e.g., incrementing a counter to ensure independent sessions), care must be taken that forks of this SUL manipulate the same internal state.

        a fork of this SUL.
        UnsupportedOperationException - if this SUL can't be forked.