Enum Class Direction.Axis
- All Implemented Interfaces:
Serializable, Comparable<Direction.Axis>, Constable, Predicate<Direction>, StringRepresentable
- Enclosing class:
Direction
public static enum Direction.Axis
extends Enum<Direction.Axis>
implements Predicate<Direction>, 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 StringRepresentable.EnumCodec<Direction.Axis> private final Stringstatic final Direction.Axis[]Fields inherited from interface StringRepresentable
PRE_BUILT_MAP_THRESHOLD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable Direction.Axisabstract booleanchoose(boolean x, boolean y, boolean z) abstract doublechoose(double x, double y, double z) abstract intchoose(int x, int y, int z) getName()abstract DirectiongetPlane()abstract Directionstatic Direction.AxisgetRandom(RandomSource random) booleanbooleanbooleantoString()static Direction.AxisReturns the enum constant of this class with the specified name.static Direction.Axis[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
X
-
Y
-
Z
-
-
Field Details
-
VALUES
-
CODEC
-
name
-
-
Constructor Details
-
Axis
-
-
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
-
byName
- Returns:
- the Axis specified by the given name or
nullif no such Axis exists
-
getName
-
isVertical
public boolean isVertical() -
isHorizontal
public boolean isHorizontal() -
getPositive
-
getNegative
-
getDirections
-
toString
- Overrides:
toStringin classEnum<Direction.Axis>
-
getRandom
-
test
-
getPlane
-
getSerializedName
- Specified by:
getSerializedNamein interfaceStringRepresentable
-
choose
public abstract int choose(int x, int y, int z) -
choose
public abstract double choose(double x, double y, double z) -
choose
public abstract boolean choose(boolean x, boolean y, boolean z)
-