util
Enum GameMath.MapDir

java.lang.Object
  extended by java.lang.Enum<GameMath.MapDir>
      extended by util.GameMath.MapDir
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<GameMath.MapDir>
Enclosing class:
GameMath

public static enum GameMath.MapDir
extends java.lang.Enum<GameMath.MapDir>


Enum Constant Summary
EAST
           
NORTH
           
NORTH_EAST
           
NORTH_WEST
           
SOUTH
           
SOUTH_EAST
           
SOUTH_WEST
           
WEST
           
 
Field Summary
 int degrees
           
 int octant
           
 
Method Summary
 GameMath.MapDir add(GameMath.MapDir dir)
           
static GameMath.MapDir getDir(int dx, int dy)
           
 int getX()
           
 int getY()
           
 GameMath.MapDir rotate(GameMath.MapRotate rot)
           
 java.lang.String toString()
           
static GameMath.MapDir valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static GameMath.MapDir[] 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, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

EAST

public static final GameMath.MapDir EAST

NORTH_EAST

public static final GameMath.MapDir NORTH_EAST

NORTH

public static final GameMath.MapDir NORTH

NORTH_WEST

public static final GameMath.MapDir NORTH_WEST

WEST

public static final GameMath.MapDir WEST

SOUTH_WEST

public static final GameMath.MapDir SOUTH_WEST

SOUTH

public static final GameMath.MapDir SOUTH

SOUTH_EAST

public static final GameMath.MapDir SOUTH_EAST
Field Detail

octant

public final int octant

degrees

public final int degrees
Method Detail

values

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

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

valueOf

public static GameMath.MapDir 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

getX

public int getX()

getY

public int getY()

rotate

public GameMath.MapDir rotate(GameMath.MapRotate rot)

add

public GameMath.MapDir add(GameMath.MapDir dir)

getDir

public static GameMath.MapDir getDir(int dx,
                                     int dy)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<GameMath.MapDir>