Package com.marcpg.libpg.util
Enum Class GraceAccess.State
- All Implemented Interfaces:
Serializable
,Comparable<GraceAccess.State>
,Constable
- Enclosing class:
- GraceAccess
Represents the state of the backdoor.
The server should either return the ordinal, or the name of the state.
- Since:
- 0.1.2
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe software was paid for.The server could not be reached.The software was not paid for.The time is not yet up. -
Method Summary
Modifier and TypeMethodDescriptionstatic GraceAccess.State
Tries getting a state out of the string.static GraceAccess.State
Returns the enum constant of this class with the specified name.static GraceAccess.State[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNAVAILABLE
The server could not be reached. -
WAIT
The time is not yet up. Waiting for a result. -
PAID
The software was paid for. Disable backdoor. -
UNPAID
The software was not paid for. Activate backdoor.
-
-
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
-
of
Tries getting a state out of the string. Considers these two possibilities:- The state's name (case insensitive) is in the string.
- The state's ordinal integer (index) is in the string.
- Parameters:
name
- The input string containing the name or index.- Returns:
- The state, or
UNAVAILABLE
if the string did not contain a valid state.
-