Class Direction
java.lang.Object
|
+--Enumerate
|
+--Direction
- All Implemented Interfaces:
- java.io.Serializable
- public class Direction
- extends Enumerate
The Direction class extends the Enumerate class and represents the four
directions a Robot can move on a map. The four directions that a robot can
move are up, down, left and right.
- See Also:
- Serialized Form
Constructor Summary |
Direction(java.lang.String name)
Constructor - calls the constructor of the Enumerate class that
Direction inherits. |
Methods inherited from class Enumerate |
get, get, getName, iterator, pos, readResolve, size, toArray, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
UP
public static final Direction UP
DOWN
public static final Direction DOWN
LEFT
public static final Direction LEFT
RIGHT
public static final Direction RIGHT
Direction
public Direction(java.lang.String name)
Constructor - calls the constructor of the Enumerate class that
Direction inherits.
- Parameters:
name
- the name of the direction: up, down, left or right