Enum Class Handoff.HandoffState
- All Implemented Interfaces:
Serializable,Comparable<Handoff.HandoffState>,Constable
- Enclosing class:
- Handoff
Enum representing the different possible states of the handoff.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate edu.wpi.first.units.measure.VoltageThe target voltage of the handoff motor. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateHandoffState(edu.wpi.first.units.measure.Voltage targetVoltage) Constructs a HandoffState with the given target voltage. -
Method Summary
Modifier and TypeMethodDescriptionedu.wpi.first.units.measure.VoltageGets the target voltage of the handoff motor in the corresponding state.static Handoff.HandoffStateReturns the enum constant of this class with the specified name.static Handoff.HandoffState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
IDLE
Handoff is stopped. -
FORWARD
The handoff runs forward. -
REVERSE
The handoff runs backward.
-
-
Field Details
-
targetVoltage
The target voltage of the handoff motor.
-
-
Constructor Details
-
HandoffState
Constructs a HandoffState with the given target voltage.- Parameters:
targetVoltage- the target voltage of the handoff motor in the corresponding state.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getTargetVoltage
Gets the target voltage of the handoff motor in the corresponding state.- Returns:
- the target voltage of the handoff motor
-