|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.infonode.util.Enum
net.infonode.util.Direction
An enum class for directions, up, down, left, right.
Field Summary | |
static Direction[] |
DIRECTIONS
Array containing all directions. |
static Direction |
DOWN
Down direction. |
static Direction |
LEFT
Left direction. |
static Direction |
RIGHT
Right direction. |
static Direction |
UP
Up direction. |
Method Summary | |
static Direction |
decode(ObjectInputStream in)
Decodes a direction from a stream. |
static Direction[] |
getDirections()
Gets all directions. |
Direction |
getNextCCW()
Returns the direction that is one quarter of a revolution counter clock wise. |
Direction |
getNextCW()
Returns the direction that is one quarter of a revolution clock wise. |
Direction |
getOpposite()
Returns the opposite direction. |
boolean |
isHorizontal()
Returns true if the direction is horizontal. |
Methods inherited from class net.infonode.util.Enum |
getName, getValue, toString, write |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final Direction UP
public static final Direction RIGHT
public static final Direction DOWN
public static final Direction LEFT
public static final Direction[] DIRECTIONS
Method Detail |
public Direction getNextCW()
public Direction getNextCCW()
public boolean isHorizontal()
public Direction getOpposite()
public static Direction[] getDirections()
public static Direction decode(ObjectInputStream in) throws IOException
in
- the stream containing the direction
IOException
- if there is a stream error
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |