Enum Class PS5Controller.Axis

java.lang.Object
java.lang.Enum<PS5Controller.Axis>
edu.wpi.first.wpilibj.PS5Controller.Axis
All Implemented Interfaces:
Serializable, Comparable<PS5Controller.Axis>, Constable
Enclosing class:
PS5Controller

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

  • Field Details

    • value

      public final int value
      Axis value.
  • Method Details

    • values

      public static PS5Controller.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 PS5Controller.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 `2`.

      Primarily used for automated unit tests.

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