es.ucm.fdi.hysteria.game
Enum Game.Direction

java.lang.Object
  extended by java.lang.Enum<Game.Direction>
      extended by es.ucm.fdi.hysteria.game.Game.Direction
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Game.Direction>
Enclosing class:
Game

public static enum Game.Direction
extends java.lang.Enum<Game.Direction>

It represents the compass directions: North, east, south and west.

Author:
Sandor

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

DOWN

public static final Game.Direction DOWN

EAST

public static final Game.Direction EAST

IN

public static final Game.Direction IN

NORTH

public static final Game.Direction NORTH

NORTHEAST

public static final Game.Direction NORTHEAST

NORTHWEST

public static final Game.Direction NORTHWEST

OUT

public static final Game.Direction OUT

SOUTH

public static final Game.Direction SOUTH

SOUTHEAST

public static final Game.Direction SOUTHEAST

SOUTHWEST

public static final Game.Direction SOUTHWEST

UP

public static final Game.Direction UP

WEST

public static final Game.Direction WEST
Method Detail

values

public static Game.Direction[] 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 (Game.Direction c : Game.Direction.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Game.Direction 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 name
java.lang.NullPointerException - if the argument is null

getOppositeDirection

public abstract Game.Direction getOppositeDirection()
It returns the opposite direction of a given one

Returns:
Opposite direction

getKeyword

public java.lang.String getKeyword()
Returns keyword token

Returns:
The keyword

valueOfKeyword

public static Game.Direction valueOfKeyword(java.lang.String key)