Enum Class GraceAccess.State

java.lang.Object
java.lang.Enum<GraceAccess.State>
com.marcpg.libpg.util.GraceAccess.State
All Implemented Interfaces:
Serializable, Comparable<GraceAccess.State>, Constable
Enclosing class:
GraceAccess

public static enum GraceAccess.State extends Enum<GraceAccess.State>
Represents the state of the backdoor. The server should either return the ordinal, or the name of the state.
Since:
0.1.2
  • Enum Constant Details

    • UNAVAILABLE

      public static final GraceAccess.State UNAVAILABLE
      The server could not be reached.
    • WAIT

      public static final GraceAccess.State WAIT
      The time is not yet up. Waiting for a result.
    • UNPAID

      public static final GraceAccess.State UNPAID
      The software was not paid for. Activate backdoor.
  • Method Details

    • values

      public static GraceAccess.State[] 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 GraceAccess.State 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
    • of

      public static GraceAccess.State of(String name)
      Tries getting a state out of the string. Considers these two possibilities:
      1. The state's name (case insensitive) is in the string.
      2. 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.