Class StatefulCommand
- java.lang.Object
 - 
- edu.wpi.first.wpilibj2.command.CommandBase
 - 
- com.lightningrobotics.common.command.core.StatefulCommand
 
 
 
- 
- All Implemented Interfaces:
 edu.wpi.first.util.sendable.Sendable,edu.wpi.first.wpilibj2.command.Command
public class StatefulCommand extends edu.wpi.first.wpilibj2.command.CommandBaseA command that iterates through a list of states subclass-defined states. 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected java.lang.Runnabledefault_action 
- 
Constructor Summary
Constructors Constructor Description StatefulCommand(java.lang.Enum<?> state) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()java.lang.Enum<?>getCallingState()java.lang.Enum<?>getState()voidinitialize()booleanisFinished()protected java.lang.StringmethodName(java.lang.Enum<?> state)protected voidsetDefaultAction(java.lang.Runnable action)voidsetState(java.lang.Enum<?> new_state)- 
Methods inherited from class edu.wpi.first.wpilibj2.command.CommandBase
addRequirements, getName, getRequirements, getSubsystem, initSendable, setName, setSubsystem, withName 
 - 
 
 - 
 
- 
- 
Method Detail
- 
setState
public void setState(java.lang.Enum<?> new_state)
 
- 
getState
public java.lang.Enum<?> getState()
 
- 
getCallingState
public java.lang.Enum<?> getCallingState()
 
- 
setDefaultAction
protected void setDefaultAction(java.lang.Runnable action)
 
- 
initialize
public void initialize()
 
- 
isFinished
public boolean isFinished()
 
- 
methodName
protected java.lang.String methodName(java.lang.Enum<?> state)
 
- 
execute
public void execute()
 
 - 
 
 -