Package xyz.calcugames.levelz
Enum Class Dimension
- All Implemented Interfaces:
Serializable
,Comparable<Dimension>
,Constable
Represents a Game Dimension.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescription@NotNull String
Gets the default coordinate for this dimension in string form.boolean
is2D()
Gets if this dimension is 2D.boolean
is3D()
Gets if this dimension is 3D.static Dimension
Returns the enum constant of this class with the specified name.static Dimension[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TWO
Represents a 2D Plane. -
THREE
Represents a 3D Space.
-
-
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
-
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
Gets the default coordinate for this dimension in string form.- Returns:
- Default Coordinate
-