jtge.util.grid.directiongroup
Interface IDirectionGroup

All Known Implementing Classes:
AbstractDirectionGroup

public interface IDirectionGroup

Direction group definition.

Version:
$Id: IDirectionGroup.java,v 1.1 2005/09/09 22:12:34 mat007 Exp $
Author:
Jean-Laurent Fabre de Morlhon

Method Summary
 java.lang.String[] getNames()
          Retrieve a string representations of all directions.
 java.lang.String[] getShortNames()
          Retrieve a string short representations of all directions.
 java.util.Iterator iterator()
          Retrieve an iterator on directions.
 Coordinate transform(Coordinate coordinate, East direction)
          Retrieve the coordinate next to another in a given direction.
 Coordinate transform(Coordinate coordinate, North direction)
          Retrieve the coordinate next to another in a given direction.
 Coordinate transform(Coordinate coordinate, NorthEast direction)
          Retrieve the coordinate next to another in a given direction.
 Coordinate transform(Coordinate coordinate, NorthWest direction)
          Retrieve the coordinate next to another in a given direction.
 Coordinate transform(Coordinate coordinate, South direction)
          Retrieve the coordinate next to another in a given direction.
 Coordinate transform(Coordinate coordinate, SouthEast direction)
          Retrieve the coordinate next to another in a given direction.
 Coordinate transform(Coordinate coordinate, SouthWest direction)
          Retrieve the coordinate next to another in a given direction.
 Coordinate transform(Coordinate coordinate, West direction)
          Retrieve the coordinate next to another in a given direction.
 

Method Detail

iterator

public java.util.Iterator iterator()
Retrieve an iterator on directions.

Returns:
an iterator on directions

getNames

public java.lang.String[] getNames()
Retrieve a string representations of all directions.

Returns:
an array containing the names

getShortNames

public java.lang.String[] getShortNames()
Retrieve a string short representations of all directions.

Returns:
an array containing the short names

transform

public Coordinate transform(Coordinate coordinate,
                            West direction)
Retrieve the coordinate next to another in a given direction.

Parameters:
coordinate - the origin
direction - the direction
Returns:
a coordinate

transform

public Coordinate transform(Coordinate coordinate,
                            East direction)
Retrieve the coordinate next to another in a given direction.

Parameters:
coordinate - the origin
direction - the direction
Returns:
a coordinate

transform

public Coordinate transform(Coordinate coordinate,
                            North direction)
Retrieve the coordinate next to another in a given direction.

Parameters:
coordinate - the origin
direction - the direction
Returns:
a coordinate

transform

public Coordinate transform(Coordinate coordinate,
                            NorthEast direction)
Retrieve the coordinate next to another in a given direction.

Parameters:
coordinate - the origin
direction - the direction
Returns:
a coordinate

transform

public Coordinate transform(Coordinate coordinate,
                            NorthWest direction)
Retrieve the coordinate next to another in a given direction.

Parameters:
coordinate - the origin
direction - the direction
Returns:
a coordinate

transform

public Coordinate transform(Coordinate coordinate,
                            South direction)
Retrieve the coordinate next to another in a given direction.

Parameters:
coordinate - the origin
direction - the direction
Returns:
a coordinate

transform

public Coordinate transform(Coordinate coordinate,
                            SouthEast direction)
Retrieve the coordinate next to another in a given direction.

Parameters:
coordinate - the origin
direction - the direction
Returns:
a coordinate

transform

public Coordinate transform(Coordinate coordinate,
                            SouthWest direction)
Retrieve the coordinate next to another in a given direction.

Parameters:
coordinate - the origin
direction - the direction
Returns:
a coordinate


Copyright © 2003-2005 . All Rights Reserved.