public class CommandGroup extends Command
| Constructor and Description |
|---|
CommandGroup()
Creates an empty CommandGroup
|
CommandGroup(Command... c)
Creates a CommandGroup consisting of the Commands passed as arguments.
|
| Modifier and Type | Method and Description |
|---|---|
CommandGroup |
add(Command... c)
Adds a Command to this CommandGroup.
|
boolean |
isFinished()
User-implemented method to check if
onLoop should stop executing. |
void |
onInit()
Runs once every time this
Command is started. |
void |
onLoop()
Runs continuously until
isFinished returns true. |
void |
onStop()
Runs once when
isFinished returns true and onLoop finishes. |
public CommandGroup()
public CommandGroup(Command... c)
c - The Commands to be in the CommandGroup.public CommandGroup add(Command... c)
c - The Command to be added.public void onInit()
CommandCommand is started.public void onLoop()
CommandisFinished returns true. Is not guaranteed to run.public void onStop()
CommandisFinished returns true and onLoop finishes.public boolean isFinished()
CommandonLoop should stop executing.isFinished in class CommandonLoop should onStop executing