|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<Location.CompassDirection> ch.aplu.jgamegrid.Location.CompassDirection
public static enum Location.CompassDirection
Class to represent the 8 compass directions.
Enum Constant Summary | |
---|---|
EAST
The compass direction for east. |
|
NORTH
The compass direction for north. |
|
NORTHEAST
The compass direction for northeast. |
|
NORTHWEST
The compass direction for northwest. |
|
SOUTH
The compass direction for south. |
|
SOUTHEAST
The compass direction for southeast. |
|
SOUTHWEST
The compass direction for southwest. |
|
WEST
The compass direction for west. |
Method Summary | |
---|---|
int |
getDirection()
Returns the direction in degrees (0 to east, clockwise). |
static Location.CompassDirection |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static Location.CompassDirection[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final Location.CompassDirection EAST
public static final Location.CompassDirection SOUTHEAST
public static final Location.CompassDirection SOUTH
public static final Location.CompassDirection SOUTHWEST
public static final Location.CompassDirection WEST
public static final Location.CompassDirection NORTHWEST
public static final Location.CompassDirection NORTH
public static final Location.CompassDirection NORTHEAST
Method Detail |
---|
public static Location.CompassDirection[] values()
for (Location.CompassDirection c : Location.CompassDirection.values()) System.out.println(c);
public static Location.CompassDirection 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 name
java.lang.NullPointerException
- if the argument is nullpublic int getDirection()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |