Package net.minecraft.util
Enum EnumFacing.Axis
- java.lang.Object
-
- java.lang.Enum<EnumFacing.Axis>
-
- net.minecraft.util.EnumFacing.Axis
-
- All Implemented Interfaces:
Predicate<EnumFacing>
,java.io.Serializable
,java.lang.Comparable<EnumFacing.Axis>
,IStringSerializable
- Enclosing class:
- EnumFacing
public static enum EnumFacing.Axis extends java.lang.Enum<EnumFacing.Axis> implements Predicate<EnumFacing>, IStringSerializable
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
apply(EnumFacing enumfacing)
Returns the result of applying this predicate toinput
.static EnumFacing.Axis
byName(java.lang.String name)
+ Get the facing specified by the given namejava.lang.String
getName()
java.lang.String
getName2()
+ Same as getName, but does not override the method from Enum.EnumFacing.Plane
getPlane()
boolean
isHorizontal()
boolean
isVertical()
java.lang.String
toString()
static EnumFacing.Axis
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static EnumFacing.Axis[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
X
public static final EnumFacing.Axis X
-
Y
public static final EnumFacing.Axis Y
-
Z
public static final EnumFacing.Axis Z
-
-
Method Detail
-
values
public static EnumFacing.Axis[] 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 (EnumFacing.Axis c : EnumFacing.Axis.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EnumFacing.Axis 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
-
byName
public static EnumFacing.Axis byName(java.lang.String name)
+ Get the facing specified by the given name
-
getName2
public java.lang.String getName2()
+ Same as getName, but does not override the method from Enum.
-
isVertical
public boolean isVertical()
-
isHorizontal
public boolean isHorizontal()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Enum<EnumFacing.Axis>
-
apply
public boolean apply(EnumFacing enumfacing)
Description copied from interface:Predicate
Returns the result of applying this predicate toinput
. This method is generally expected, but not absolutely required, to have the following properties:- Its execution does not cause any observable side effects.
- The computation is consistent with equals; that is,
Objects.equal
(a, b)
implies thatpredicate.apply(a) == predicate.apply(b))
.
- Specified by:
apply
in interfacePredicate<EnumFacing>
-
getPlane
public EnumFacing.Plane getPlane()
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfaceIStringSerializable
-
-