jtge.util.grid
Class LinearTileIterator

java.lang.Object
  extended byjtge.util.grid.LinearTileIterator
All Implemented Interfaces:
java.util.Iterator

public class LinearTileIterator
extends java.lang.Object
implements java.util.Iterator

Provides a linear iterator from the top left to the bottom right tile.

This iterator returns all the non null tile within the grid.

Version:
$Id: LinearTileIterator.java,v 1.2 2005/09/09 18:19:41 mat007 Exp $
Author:
Jean-Laurent Fabre de Morlhon

Constructor Summary
LinearTileIterator(IGrid grid)
          Create a linear tile iterator.
LinearTileIterator(IGrid grid, Coordinate coordinate)
          Create a linear tile iterator starting a the given coordinate.
 
Method Summary
 boolean hasNext()
          
 java.lang.Object next()
          
 void remove()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinearTileIterator

public LinearTileIterator(IGrid grid)
Create a linear tile iterator.

Parameters:
grid - the grid

LinearTileIterator

public LinearTileIterator(IGrid grid,
                          Coordinate coordinate)
Create a linear tile iterator starting a the given coordinate.

Parameters:
grid - the grid
coordinate - the coordinate to start from
Method Detail

hasNext

public final boolean hasNext()

Specified by:
hasNext in interface java.util.Iterator

next

public final java.lang.Object next()

Specified by:
next in interface java.util.Iterator

remove

public final void remove()

Specified by:
remove in interface java.util.Iterator


Copyright © 2003-2005 . All Rights Reserved.