Package net.royalur.model.shape
Enum Class BoardType
- All Implemented Interfaces:
Serializable
,Comparable<BoardType>
,Constable
,BoardShapeFactory
The type of board 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
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Map<String,
BoardShapeFactory> A store to be used to parse board shapes. -
Method Summary
Modifier and TypeMethodDescriptionabstract BoardShape
Create an instance of the board shape.static BoardType
Get the board type with an ID of .static BoardType
getByIDOrNull
(String id) Get the board type with an ID of , or elsenull
.getID()
Gets the ID that refers to this board type.getName()
Gets the name of this board type.static BoardType
Returns the enum constant of this class with the specified name.static BoardType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
STANDARD
The standard board shape. -
ASEB
The Aseb board shape.
-
-
Field Details
-
PARSING_MAP
A store to be used to parse board shapes.
-
-
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 board type.- Returns:
- The ID that refers to this board type.
-
getName
Gets the name of this board type.- Returns:
- The name of this board type.
-
createBoardShape
Create an instance of the board shape.- Specified by:
createBoardShape
in interfaceBoardShapeFactory
- Returns:
- The instance of the board shape.
-
getByID
Get the board type with an ID of .- Parameters:
id
- The ID of the board type.- Returns:
- The board type with the given ID.
-
getByIDOrNull
Get the board type with an ID of , or elsenull
.- Parameters:
id
- The ID of the board type to look for.- Returns:
- The board type with the given ID, or null.
-