Enum Class AbandonReason

java.lang.Object
java.lang.Enum<AbandonReason>
net.royalur.model.AbandonReason
All Implemented Interfaces:
Serializable, Comparable<AbandonReason>, Constable

public enum AbandonReason extends Enum<AbandonReason>
The reason that a game was abandoned before it was finished.
  • Enum Constant Details

    • PLAYER_LEFT

      public static final AbandonReason PLAYER_LEFT
      A player left the game before it finished.
    • EXTERNAL

      public static final AbandonReason EXTERNAL
      An external event caused the game to end before it finished.
  • Method Details

    • values

      public static AbandonReason[] 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 AbandonReason 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
    • getID

      public String getID()
      Gets a unique ID associated with this abandon reason.
      Returns:
      A unique ID associated with this abandon reason.
    • getName

      public String getName()
      Gets an English name that can describe this abandon reason.
      Returns:
      An English name that can describe this abandon reason.
    • requiresPlayer

      public boolean requiresPlayer()
      Gets whether this abandonment reason requires a player.
      Returns:
      Whether this abandonment reason requires a player.
    • getByID

      public static AbandonReason getByID(String id)
      Retrieves the abandon reason with .
      Parameters:
      id - The unique ID associated with an abandon reason.
      Returns:
      The abandon reason associated with .