com.ibm.portal.content
Class Direction

java.lang.Object
  extended by com.ibm.portal.content.Direction
All Implemented Interfaces:
java.io.Serializable

public class Direction
extends java.lang.Object
implements java.io.Serializable

The Direction class is a finite enumeration of the four possible directions up, down, left and right.

See Also:
Serialized Form

Field Summary
static Direction DOWN
           
static Direction LEFT
           
static Direction RIGHT
           
static Direction UP
           
 
Method Summary
 Direction opposite()
          Returns the opposite of this direction.
 java.lang.String toString()
          Returns a textual representation of the direction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UP

public static final Direction UP

DOWN

public static final Direction DOWN

LEFT

public static final Direction LEFT

RIGHT

public static final Direction RIGHT
Method Detail

opposite

public Direction opposite()
Returns the opposite of this direction. This means it returns DOWN for an UP direction, LEFT for a RIGHT direction and vice versa.

Returns:
the opposite direction

toString

public java.lang.String toString()
Returns a textual representation of the direction.

Overrides:
toString in class java.lang.Object
Returns:
a string "Up", "Down", "Left" or "Right", depending on direction