Enum Rotation
- java.lang.Object
-
- java.lang.Enum<Rotation>
-
- com.gtnewhorizon.structurelib.alignment.enumerable.Rotation
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CLOCKWISECOUNTER_CLOCKWISENORMALUPSIDE_DOWN
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RotationbyIndex(int index)static RotationbyName(java.lang.String name)intgetIndex()java.lang.StringgetName()java.lang.StringgetName2()RotationgetOpposite()booleanisClockwise()booleanisCounterClockwise()booleanisNotRotated()booleanisUpsideDown()static Rotationrandom(java.util.Random rand)java.lang.StringtoString()static RotationvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static Rotation[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Field Detail
-
VALUES
public static final Rotation[] VALUES
-
-
Method Detail
-
values
public static Rotation[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Rotation c : Rotation.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Rotation valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getIndex
public int getIndex()
-
getOpposite
public Rotation getOpposite()
-
getName2
public java.lang.String getName2()
-
byName
public static Rotation byName(java.lang.String name)
-
byIndex
public static Rotation byIndex(int index)
-
random
public static Rotation random(@Nonnull java.util.Random rand)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Enum<Rotation>
-
getName
public java.lang.String getName()
-
isNotRotated
public boolean isNotRotated()
-
isClockwise
public boolean isClockwise()
-
isCounterClockwise
public boolean isCounterClockwise()
-
isUpsideDown
public boolean isUpsideDown()
-
-