|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<Direction>
org.gicentre.utils.spatial.Direction
public enum Direction
Enumerated list of direction constants. Useful for specifying rook's-case and queen's-case neighbour relations.
Enum Constant Summary | |
---|---|
CENTRE
Identifies a central position. |
|
EAST
Identifies a easterly direction. |
|
NORTH
Identifies a northerly direction. |
|
NORTH_EAST
Identifies a north-easterly direction. |
|
NORTH_WEST
Identifies a north-westerly direction. |
|
SOUTH
Identifies a southerly direction. |
|
SOUTH_EAST
Identifies a south easterly direction. |
|
SOUTH_WEST
Identifies a south-westerly direction. |
|
WEST
Identifies a westerly direction. |
Method Summary | |
---|---|
java.lang.String |
toString()
Provides a textual representation of the list of direction options. |
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. |
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 |
---|
public static final Direction NORTH
public static final Direction NORTH_EAST
public static final Direction EAST
public static final Direction SOUTH_EAST
public static final Direction SOUTH
public static final Direction SOUTH_WEST
public static final Direction WEST
public static final Direction NORTH_WEST
public static final Direction CENTRE
Method Detail |
---|
public static Direction[] values()
for (Direction c : Direction.values()) System.out.println(c);
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 name
java.lang.NullPointerException
- if the argument is nullpublic java.lang.String toString()
toString
in class java.lang.Enum<Direction>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |