vacworld
Class Direction
java.lang.Object
vacworld.Direction
public class Direction
- extends java.lang.Object
A utility class that encapsulates information about compass directions.
Field Summary |
static int[] |
DELTA_X
An array for determining the change in X position that would
correspond to a step in the direction indexed. |
static int[] |
DELTA_Y
An array for determining the change in Y position that would
correspond to a step in the direction indexed. |
static int |
EAST
|
static int |
NORTH
|
static int |
SOUTH
|
static int |
WEST
|
Method Summary |
static java.lang.String |
toString(int direction)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DELTA_X
public static final int[] DELTA_X
- An array for determining the change in X position that would
correspond to a step in the direction indexed.
DELTA_Y
public static final int[] DELTA_Y
- An array for determining the change in Y position that would
correspond to a step in the direction indexed.
EAST
public static final int EAST
- See Also:
- Constant Field Values
NORTH
public static final int NORTH
- See Also:
- Constant Field Values
SOUTH
public static final int SOUTH
- See Also:
- Constant Field Values
WEST
public static final int WEST
- See Also:
- Constant Field Values
Direction
public Direction()
toString
public static java.lang.String toString(int direction)