Package org.spongepowered.api.util
Enum AxisDirection
- java.lang.Object
-
- java.lang.Enum<AxisDirection>
-
- org.spongepowered.api.util.AxisDirection
-
- All Implemented Interfaces:
Serializable
,Comparable<AxisDirection>
public enum AxisDirection extends Enum<AxisDirection>
Represents the directional axis is either positive, zero, or negative.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
signum()
Gets the signum for this direction.static AxisDirection
valueOf(String name)
Returns the enum constant of this type with the specified name.static AxisDirection[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PLUS
public static final AxisDirection PLUS
-
ZERO
public static final AxisDirection ZERO
-
MINUS
public static final AxisDirection MINUS
-
-
Method Detail
-
values
public static AxisDirection[] 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 (AxisDirection c : AxisDirection.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AxisDirection valueOf(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
signum
public int signum()
Gets the signum for this direction.A positive direction has a value of 1, negative direction -1 and 0 for no direction.
- Returns:
- The signum
-
-