Enum Class PathType

java.lang.Object
java.lang.Enum<PathType>
net.royalur.model.path.PathType
All Implemented Interfaces:
Serializable, Comparable<PathType>, Constable, PathPairFactory

public enum PathType extends Enum<PathType> implements PathPairFactory
The type of path to use in a game.
  • Enum Constant Details

    • BELL

      public static final PathType BELL
      The path proposed by Bell for the Royal Game of Ur.
    • ASEB

      public static final PathType ASEB
      The standard path used for Aseb.
    • MASTERS

      public static final PathType MASTERS
      The path proposed by Masters for the Royal Game of Ur.
    • MURRAY

      public static final PathType MURRAY
      The path proposed by Murray for the Royal Game of Ur.
    • SKIRIUK

      public static final PathType SKIRIUK
      The path proposed by Skiriuk for the Royal Game of Ur.
  • Field Details

  • Method Details

    • values

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

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

      public abstract PathPair createPathPair()
      Create an instance of the paths.
      Specified by:
      createPathPair in interface PathPairFactory
      Returns:
      The instance of the paths.
    • getByID

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

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