Package io.github.coho04.githubapi.enums
Enum Class GHState
- All Implemented Interfaces:
Serializable
,Comparable<GHState>
,Constable
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic GHState
fromString
(String state) Returns the GHState that corresponds to the specified string.toString()
Returns the string representation of the state.static GHState
Returns the enum constant of this class with the specified name.static GHState[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
OPEN
-
CLOSED
-
ALL
-
-
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
Returns the string representation of the state. The string is the name of the enum constant in lower case. -
fromString
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
-