Enum Constant and Description |
---|
EAST
Direction East.
|
NONE
No direction.
|
NORTH
Direction North.
|
NORTHEAST
Direction North East.
|
NORTHWEST
Direction North West.
|
SOUTH
Direction South.
|
SOUTHEAST
Direction South East.
|
SOUTHWEST
Direction South West.
|
WEST
Direction West.
|
Modifier and Type | Method and Description |
---|---|
double |
getX()
Get the x component of the direction vector.
|
double |
getY()
Get the y component of the direction vector.
|
static Direction |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Direction[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Direction EAST
public static final Direction NONE
public static final Direction NORTH
public static final Direction NORTHEAST
public static final Direction NORTHWEST
public static final Direction SOUTH
public static final Direction SOUTHEAST
public static final Direction SOUTHWEST
public static final Direction WEST
public double getX()
public double getY()
public static Direction valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static Direction[] values()
for (Direction c : Direction.values()) System.out.println(c);