jtge.util.grid.directiongroup
Class AbstractDirectionGroup

java.lang.Object
  extended byjtge.util.grid.directiongroup.AbstractDirectionGroup
All Implemented Interfaces:
IDirectionGroup
Direct Known Subclasses:
AbstractFlatHexagonDirectionGroup, AbstractPeakHexagonDirectionGroup, AbstractSquareDirectionGroup

public abstract class AbstractDirectionGroup
extends java.lang.Object
implements IDirectionGroup

Provides direction groups common behaviours.

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

Constructor Summary
protected AbstractDirectionGroup()
          Create an abstract direction group.
 
Method Summary
protected  void add(IDirection direction)
          Add a direction to the group.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jtge.util.grid.directiongroup.IDirectionGroup
transform, transform, transform, transform, transform, transform, transform, transform
 

Constructor Detail

AbstractDirectionGroup

protected AbstractDirectionGroup()
Create an abstract direction group.

Method Detail

add

protected final void add(IDirection direction)
Add a direction to the group.

Parameters:
direction - the direction to add

iterator

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

Specified by:
iterator in interface IDirectionGroup
Returns:
an iterator on directions

getNames

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

Specified by:
getNames in interface IDirectionGroup
Returns:
an array containing the names

getShortNames

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

Specified by:
getShortNames in interface IDirectionGroup
Returns:
an array containing the short names


Copyright © 2003-2005 . All Rights Reserved.