Enum Class Gamepad.Axis

java.lang.Object
java.lang.Enum<Gamepad.Axis>
org.wpilib.driverstation.Gamepad.Axis
All Implemented Interfaces:
Serializable, Comparable<Gamepad.Axis>, Constable
Enclosing class:
Gamepad

public static enum Gamepad.Axis extends Enum<Gamepad.Axis>
Represents an axis on an Gamepad.
  • Enum Constant Details

  • Field Details

    • value

      public final int value
      Axis value.
  • Method Details

    • values

      public static Gamepad.Axis[] 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

      public static Gamepad.Axis valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Get the human-friendly name of the axis, matching the relevant methods. This is done by stripping the leading `k`, and appending `Axis` if the name ends with `Trigger`.

      Primarily used for automated unit tests.

      Overrides:
      toString in class Enum<Gamepad.Axis>
      Returns:
      the human-friendly name of the axis.