Enum Class BoardType

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

public enum BoardType extends Enum<BoardType> implements BoardShapeFactory
The type of board to use in a game.
  • Enum Constant Details

    • STANDARD

      public static final BoardType STANDARD
      The standard board shape.
    • ASEB

      public static final BoardType ASEB
      The Aseb board shape.
  • Field Details

  • Method Details

    • values

      public static BoardType[] 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 BoardType 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 the ID that refers to this board type.
      Returns:
      The ID that refers to this board type.
    • getName

      public String getName()
      Gets the name of this board type.
      Returns:
      The name of this board type.
    • createBoardShape

      public abstract BoardShape createBoardShape()
      Create an instance of the board shape.
      Specified by:
      createBoardShape in interface BoardShapeFactory
      Returns:
      The instance of the board shape.
    • getByID

      public static BoardType getByID(String id)
      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

      @Nullable public static BoardType getByIDOrNull(@Nullable String id)
      Get the board type with an ID of , or else null.
      Parameters:
      id - The ID of the board type to look for.
      Returns:
      The board type with the given ID, or null.