Class StateMachine.TransitionNeedsTargetStage

java.lang.Object
org.wpilib.command3.StateMachine.TransitionNeedsTargetStage
Enclosing class:
StateMachine

public static final class StateMachine.TransitionNeedsTargetStage extends Object
A builder for a transition from one state to another. Use to(State) to specify the target state to transition to.
  • Method Details

    • to

      Specifies the target state to transition to.
      Parameters:
      to - The state to transition to. Cannot be null.
      Returns:
      A builder to specify the transition condition.
    • to

      Specifies a dynamic target state to transition to. The supplier will be evaluated at the time the transition condition is met.
      Parameters:
      dynamic - A dynamic supplier for next states. Cannot be null.
      Returns:
      A builder to specify the transition condition.
    • toExitStateMachine

      public StateMachine.TransitionNeedsConditionStage toExitStateMachine()
      Specifies the transition will exit the state machine when triggered, rather than moving to a different state.
      Returns:
      A builder to specify the transition condition.