Enum Class Dimension

java.lang.Object
java.lang.Enum<Dimension>
xyz.calcugames.levelz.Dimension
All Implemented Interfaces:
Serializable, Comparable<Dimension>, Constable

public enum Dimension extends Enum<Dimension>
Represents a Game Dimension.
  • Enum Constant Details

    • TWO

      public static final Dimension TWO
      Represents a 2D Plane.
    • THREE

      public static final Dimension THREE
      Represents a 3D Space.
  • Method Details

    • values

      public static Dimension[] 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 Dimension 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
    • is2D

      public boolean is2D()
      Gets if this dimension is 2D.
      Returns:
      true if 2D, false if 3D
    • is3D

      public boolean is3D()
      Gets if this dimension is 3D.
      Returns:
      true if 3D, false if 2D
    • getDefaultCoordinate

      @NotNull public @NotNull String getDefaultCoordinate()
      Gets the default coordinate for this dimension in string form.
      Returns:
      Default Coordinate