001// Copyright (c) FIRST and other WPILib contributors.
002// Open Source Software; you can modify and/or share it under the terms of
003// the WPILib BSD license file in the root directory of this project.
004
005package edu.wpi.first.wpilibj2.command;
006
007/**
008 * A base for CommandGroups.
009 *
010 * <p>This class is provided by the NewCommands VendorDep
011 *
012 * @deprecated This class is an empty abstraction. Inherit directly from CommandBase/Command.
013 */
014@Deprecated(forRemoval = true)
015public abstract class CommandGroupBase extends CommandBase {
016  /**
017   * Adds the given commands to the command group.
018   *
019   * @param commands The commands to add.
020   */
021  public abstract void addCommands(Command... commands);
022
023  /**
024   * Factory method for {@link SequentialCommandGroup}, included for brevity/convenience.
025   *
026   * @param commands the commands to include
027   * @return the command group
028   * @deprecated Replace with {@link Commands#sequence(Command...)}
029   */
030  @Deprecated
031  public static SequentialCommandGroup sequence(Command... commands) {
032    return new SequentialCommandGroup(commands);
033  }
034
035  /**
036   * Factory method for {@link ParallelCommandGroup}, included for brevity/convenience.
037   *
038   * @param commands the commands to include
039   * @return the command group
040   * @deprecated Replace with {@link Commands#parallel(Command...)}
041   */
042  @Deprecated
043  public static ParallelCommandGroup parallel(Command... commands) {
044    return new ParallelCommandGroup(commands);
045  }
046
047  /**
048   * Factory method for {@link ParallelRaceGroup}, included for brevity/convenience.
049   *
050   * @param commands the commands to include
051   * @return the command group
052   * @deprecated Replace with {@link Commands#race(Command...)}
053   */
054  @Deprecated
055  public static ParallelRaceGroup race(Command... commands) {
056    return new ParallelRaceGroup(commands);
057  }
058
059  /**
060   * Factory method for {@link ParallelDeadlineGroup}, included for brevity/convenience.
061   *
062   * @param deadline the deadline command
063   * @param commands the commands to include
064   * @return the command group
065   * @deprecated Replace with {@link Commands#deadline(Command, Command...)}
066   */
067  @Deprecated
068  public static ParallelDeadlineGroup deadline(Command deadline, Command... commands) {
069    return new ParallelDeadlineGroup(deadline, commands);
070  }
071}