Enum Class GHState

java.lang.Object
java.lang.Enum<GHState>
io.github.coho04.githubapi.enums.GHState
All Implemented Interfaces:
Serializable, Comparable<GHState>, Constable

public enum GHState extends Enum<GHState>
This enum represents the possible states of a GitHub issue or pull request. It provides methods for converting the state to a string and for creating a GHState from a string.
  • Enum Constant Details

    • OPEN

      public static final GHState OPEN
    • CLOSED

      public static final GHState CLOSED
    • ALL

      public static final GHState ALL
  • Method Details

    • values

      public static GHState[] 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 GHState 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()
      Returns the string representation of the state. The string is the name of the enum constant in lower case.
      Overrides:
      toString in class Enum<GHState>
      Returns:
      the string representation of the state
    • fromString

      public static GHState fromString(String state)
      Returns the GHState that corresponds to the specified string. The string is converted to upper case and then used to get the enum constant with that name.
      Parameters:
      state - the string
      Returns:
      the GHState