Package edu.wpi.first.wpilibj
Enum Class XboxController.Button
- All Implemented Interfaces:
Serializable
,Comparable<XboxController.Button>
,Constable
- Enclosing class:
- XboxController
Represents a digital button on a XboxController.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionA button.B button.Back button.Left bumper button.Left stick button.Right bumper button.Right stick button.Start button.X button.Y button. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiontoString()
Get the human-friendly name of the button, matching the relevant methods.static XboxController.Button
Returns the enum constant of this class with the specified name.static XboxController.Button[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
kA
A button. -
kB
B button. -
kX
X button. -
kY
Y button. -
kLeftBumper
Left bumper button. -
kRightBumper
Right bumper button. -
kBack
Back button. -
kStart
Start button. -
kLeftStick
Left stick button. -
kRightStick
Right stick button.
-
-
Field Details
-
value
Button value.
-
-
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
-
toString
Get the human-friendly name of the button, matching the relevant methods. This is done by stripping the leading `k`, and appending `Button`.Primarily used for automated unit tests.
- Overrides:
toString
in classEnum<XboxController.Button>
- Returns:
- the human-friendly name of the button.
-