Package net.royalur.stats
Enum Class GameStatsTarget
- All Implemented Interfaces:
Serializable
,Comparable<GameStatsTarget>
,Constable
A target for the accumulation of statistics for games of the Royal Game of Ur.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic GameStatsTarget
get
(PlayerType player) Retrieves the target associated withplayer
.Gets the specific player associated with this target.getName()
Gets a human-readable name representing this target, in English.boolean
Gets whether this target is associated with a specific player.static GameStatsTarget
Returns the enum constant of this class with the specified name.static GameStatsTarget[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
OVERALL
The overall statistics of both players. -
LIGHT
The statistics of the light player. -
DARK
The statistics of the dark player.
-
-
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
-
getName
Gets a human-readable name representing this target, in English.- Returns:
- A human-readable name representing this target, in English.
-
hasAssociatedPlayer
public boolean hasAssociatedPlayer()Gets whether this target is associated with a specific player.- Returns:
- Whether this target is associated with a specific player.
-
getAssociatedPlayer
Gets the specific player associated with this target.- Returns:
- The specific player associated with this target.
- Throws:
UnsupportedOperationException
- if this target does not have an associated player.
-
get
Retrieves the target associated withplayer
.- Parameters:
player
- The player to retrieve the statistics for.- Returns:
- The target associated with
player
.
-