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()
Command
Command
is started.public void onLoop()
Command
isFinished
returns true. Is not guaranteed to run.public void onStop()
Command
isFinished
returns true and onLoop
finishes.public boolean isFinished()
Command
onLoop
should stop executing.isFinished
in class Command
onLoop
should onStop executing