Package net.royalur.model
Enum Class AbandonReason
- All Implemented Interfaces:
Serializable
,Comparable<AbandonReason>
,Constable
The reason that a game was abandoned before it was finished.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionAn external event caused the game to end before it finished.A player left the game before it finished. -
Method Summary
Modifier and TypeMethodDescriptionstatic AbandonReason
Retrieves the abandon reason with .getID()
Gets a unique ID associated with this abandon reason.getName()
Gets an English name that can describe this abandon reason.boolean
Gets whether this abandonment reason requires a player.static AbandonReason
Returns the enum constant of this class with the specified name.static AbandonReason[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PLAYER_LEFT
A player left the game before it finished. -
EXTERNAL
An external event caused the game to end before it finished.
-
-
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
-
getID
Gets a unique ID associated with this abandon reason.- Returns:
- A unique ID associated with this abandon reason.
-
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
Retrieves the abandon reason with .- Parameters:
id
- The unique ID associated with an abandon reason.- Returns:
- The abandon reason associated with .
-