Interface StateMachineAccessor<S,E>

Type Parameters:
S - the type of state
E - the type of event

public interface StateMachineAccessor<S,E>
Functional interface for StateMachine to allow more programmatic access to underlying functionality. Functions prefixed "doWith" will expose StateMachineAccess via Consumer for better functional access with jdk8. Functions prefixed "with" is better suitable for lambdas.
  • Method Details

    • doWithAllRegions

      void doWithAllRegions(Consumer<StateMachineAccess<S,E>> stateMachineAccess)
      Execute given function with all recursive regions.
      Parameters:
      stateMachineAccess - the state machine access
    • withAllRegions

      List<StateMachineAccess<S,E>> withAllRegions()
      Gets all regions.
      Returns:
      the all regions
    • doWithRegion

      void doWithRegion(Consumer<StateMachineAccess<S,E>> stateMachineAccess)
      Execute given function with a region.
      Parameters:
      stateMachineAccess - the state machine access
    • withRegion

      StateMachineAccess<S,E> withRegion()
      Get a region.
      Returns:
      the state machine access