public abstract class CommandBase extends java.lang.Object implements Command
Command
s.Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
m_name |
protected java.util.Set<Subsystem> |
m_requirements |
protected java.lang.String |
m_subsystem |
Constructor and Description |
---|
CommandBase() |
Modifier and Type | Method and Description |
---|---|
void |
addRequirements(Subsystem... requirements)
Adds the specified requirements to the command.
|
java.lang.String |
getName() |
java.util.Set<Subsystem> |
getRequirements()
Specifies the set of subsystems used by this command.
|
java.lang.String |
getSubsystem() |
void |
setName(java.lang.String name) |
void |
setSubsystem(java.lang.String subsystem) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
alongWith, andThen, asProxy, beforeStarting, cancel, deadlineWith, end, execute, hasRequirement, initialize, interruptOn, isFinished, isScheduled, perpetually, raceWith, runsWhenDisabled, schedule, schedule, whenFinished, withTimeout
protected java.lang.String m_name
protected java.lang.String m_subsystem
protected java.util.Set<Subsystem> m_requirements
public final void addRequirements(Subsystem... requirements)
requirements
- the requirements to addpublic java.util.Set<Subsystem> getRequirements()
Command
Note: it is recommended that user implementations contain the requirements as a field, and return that field here, rather than allocating a new set every time this is called.
getRequirements
in interface Command
public void setName(java.lang.String name)
public java.lang.String getSubsystem()
public void setSubsystem(java.lang.String subsystem)