edu.wpi.first.wpilibj.command

## Class StartCommand

- java.lang.Object
- - edu.wpi.first.wpilibj.command.Command
  - - edu.wpi.first.wpilibj.command.InstantCommand
    - - edu.wpi.first.wpilibj.command.StartCommand

- All Implemented Interfaces:
    NamedSendable, Sendable

      public class StartCommand
      extends InstantCommand

  A `StartCommand` will call the `start()` method of another command when it is initialized and will finish immediately.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StartCommand(Command commandToStart)` Instantiates a `StartCommand` which will start the given command whenever its `initialize()` is called.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `initialize()` The initialize method is called the first time this Command is run after being started.

    - ### Methods inherited from class edu.wpi.first.wpilibj.command.InstantCommand

      `isFinished`

    - ### Methods inherited from class edu.wpi.first.wpilibj.command.Command

      `cancel, clearRequirements, doesRequire, end, execute, getGroup, getName, getSmartDashboardType, initTable, interrupted, isCanceled, isInterruptible, isRunning, isTimedOut, requires, setInterruptible, setRunWhenDisabled, setTimeout, start, timeSinceInitialized, toString, willRunWhenDisabled`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### StartCommand

          public StartCommand(Command commandToStart)

      Instantiates a `StartCommand` which will start the given command whenever its `initialize()` is called.
      Parameters:
        `commandToStart` - the `Command` to start

  - ### Method Detail

    - #### initialize

          protected void initialize()

      Description copied from class: `Command`
      The initialize method is called the first time this Command is run after being started.
      Overrides:
        `initialize` in class `Command`