Interface StateMachineToolOperations

  • All Implemented Interfaces:

    
    public interface StateMachineToolOperations<S extends Enum<S>>
    
                        

    Operations for starting a state machine in a particular state.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Tool startingIn(S state) Create a version of this tool that starts in the specified state.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • startingIn

         abstract Tool startingIn(S state)

        Create a version of this tool that starts in the specified state. Useful when the starting state depends on runtime context.

        Example:

        // Statically configured
        val tool = StateMachineTool("order", "Process order", OrderState::class.java)
            .withInitialState(OrderState.DRAFT)
            ...
        
        // Dynamically start in a different state
        val resumedTool = tool.startingIn(OrderState.CONFIRMED)