|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<Game.Direction>
es.ucm.fdi.hysteria.game.Game.Direction
public static enum Game.Direction
It represents the compass directions: North, east, south and west.
Enum Constant Summary | |
---|---|
DOWN
|
|
EAST
|
|
IN
|
|
NORTH
|
|
NORTHEAST
|
|
NORTHWEST
|
|
OUT
|
|
SOUTH
|
|
SOUTHEAST
|
|
SOUTHWEST
|
|
UP
|
|
WEST
|
Method Summary | |
---|---|
java.lang.String |
getKeyword()
Returns keyword token |
abstract Game.Direction |
getOppositeDirection()
It returns the opposite direction of a given one |
static Game.Direction |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static Game.Direction |
valueOfKeyword(java.lang.String key)
|
static Game.Direction[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, 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 Game.Direction DOWN
public static final Game.Direction EAST
public static final Game.Direction IN
public static final Game.Direction NORTH
public static final Game.Direction NORTHEAST
public static final Game.Direction NORTHWEST
public static final Game.Direction OUT
public static final Game.Direction SOUTH
public static final Game.Direction SOUTHEAST
public static final Game.Direction SOUTHWEST
public static final Game.Direction UP
public static final Game.Direction WEST
Method Detail |
---|
public static Game.Direction[] values()
for (Game.Direction c : Game.Direction.values()) System.out.println(c);
public static Game.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 name
java.lang.NullPointerException
- if the argument is nullpublic abstract Game.Direction getOppositeDirection()
public java.lang.String getKeyword()
public static Game.Direction valueOfKeyword(java.lang.String key)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |