Package net.royalur.model.path
Enum Class PathType
- All Implemented Interfaces:
Serializable
,Comparable<PathType>
,Constable
,PathPairFactory
The type of path to use in a game.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe standard path used for Aseb.The path proposed by Bell for the Royal Game of Ur.The path proposed by Masters for the Royal Game of Ur.The path proposed by Murray for the Royal Game of Ur.The path proposed by Skiriuk for the Royal Game of Ur. -
Field Summary
Modifier and TypeFieldDescriptionstatic final Map<String,
PathPairFactory> A store to be used to parse path pairs. -
Method Summary
Modifier and TypeMethodDescriptionabstract PathPair
Create an instance of the paths.static PathType
Get the path type with an ID of .static PathType
getByIDOrNull
(String id) Get the path type with an ID of , or elsenull
.getID()
Gets the ID that refers to this path type.getName()
Gets the name of this path type.static PathType
Returns the enum constant of this class with the specified name.static PathType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BELL
The path proposed by Bell for the Royal Game of Ur. -
ASEB
The standard path used for Aseb. -
MASTERS
The path proposed by Masters for the Royal Game of Ur. -
MURRAY
The path proposed by Murray for the Royal Game of Ur. -
SKIRIUK
The path proposed by Skiriuk for the Royal Game of Ur.
-
-
Field Details
-
PARSING_MAP
A store to be used to parse path pairs.
-
-
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 the ID that refers to this path type.- Returns:
- The ID that refers to this path type.
-
getName
Gets the name of this path type.- Returns:
- The name of this path type.
-
createPathPair
Create an instance of the paths.- Specified by:
createPathPair
in interfacePathPairFactory
- Returns:
- The instance of the paths.
-
getByID
Get the path type with an ID of .- Parameters:
id
- The ID of the path type.- Returns:
- The path type with the given ID.
-
getByIDOrNull
Get the path type with an ID of , or elsenull
.- Parameters:
id
- The ID of the path type to look for.- Returns:
- The path type with the given ID, or null.
-