Enum Class Rotation
- All Implemented Interfaces:
Serializable, Comparable<Rotation>, Constable, StringRepresentable
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E>Nested classes/interfaces inherited from interface StringRepresentable
StringRepresentable.EnumCodec<E>, StringRepresentable.StringRepresentableCodec<S> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IntFunction<Rotation> private final Stringprivate final intDeprecated.private final OctahedralGroupstatic final StreamCodec<io.netty.buffer.ByteBuf, Rotation> Fields inherited from interface StringRepresentable
PRE_BUILT_MAP_THRESHOLD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate intgetIndex()static RotationgetRandom(RandomSource random) getRotated(Rotation rot) getShuffled(RandomSource random) introtate(int rotation, int steps) rotation()static RotationReturns the enum constant of this class with the specified name.static Rotation[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
-
CLOCKWISE_90
-
CLOCKWISE_180
-
COUNTERCLOCKWISE_90
-
-
Field Details
-
BY_ID
-
CODEC
-
STREAM_CODEC
-
LEGACY_CODEC
Deprecated. -
index
private final int index -
id
-
rotation
-
-
Constructor Details
-
Rotation
-
-
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
-
getRotated
-
rotation
-
rotate
-
rotate
public int rotate(int rotation, int steps) -
getRandom
-
getShuffled
-
getSerializedName
- Specified by:
getSerializedNamein interfaceStringRepresentable
-
getIndex
private int getIndex()
-