jtge.util.grid.direction
Class Direction

java.lang.Object
  extended byjtge.util.grid.direction.Direction
All Implemented Interfaces:
IDirection
Direct Known Subclasses:
East, North, NorthEast, NorthWest, South, SouthEast, SouthWest, West

public abstract class Direction
extends java.lang.Object
implements IDirection

Provides direction common behaviours.

Version:
$Id: Direction.java,v 1.7 2005/09/10 11:23:52 mat007 Exp $
Author:
Jean-Laurent Fabre de Morlhon

Field Summary
static Direction EAST
          The east direction.
static Direction NORTH
          The north direction.
static Direction NORTH_EAST
          The north east direction.
static Direction NORTH_WEST
          The north west direction.
static Direction SOUTH
          The south direction.
static Direction SOUTH_EAST
          The south east direction.
static Direction SOUTH_WEST
          The south west direction.
static Direction WEST
          The west direction.
 
Constructor Summary
Direction(java.lang.String name, java.lang.String shortName)
          Create a direction.
 
Method Summary
 boolean equals(java.lang.Object object)
          
 java.lang.String getName()
          Retrieve the direction name.
 java.lang.String getShortName()
          Retrieve the direction short name.
 int hashCode()
          
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jtge.util.grid.direction.IDirection
transform
 

Field Detail

NORTH

public static final Direction NORTH
The north direction.


NORTH_EAST

public static final Direction NORTH_EAST
The north east direction.


EAST

public static final Direction EAST
The east direction.


SOUTH_EAST

public static final Direction SOUTH_EAST
The south east direction.


SOUTH

public static final Direction SOUTH
The south direction.


SOUTH_WEST

public static final Direction SOUTH_WEST
The south west direction.


WEST

public static final Direction WEST
The west direction.


NORTH_WEST

public static final Direction NORTH_WEST
The north west direction.

Constructor Detail

Direction

public Direction(java.lang.String name,
                 java.lang.String shortName)
Create a direction.

Parameters:
name - the name
shortName - the short name
Method Detail

getName

public final java.lang.String getName()
Retrieve the direction name.

Specified by:
getName in interface IDirection
Returns:
the name

getShortName

public final java.lang.String getShortName()
Retrieve the direction short name.

Specified by:
getShortName in interface IDirection
Returns:
the short name

hashCode

public final int hashCode()


equals

public final boolean equals(java.lang.Object object)


toString

public final java.lang.String toString()



Copyright © 2003-2005 . All Rights Reserved.