jtge.util.grid
Class LinearIterator

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

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

Provides a linear iterator from top left to bottom right coordinate.

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

Constructor Summary
LinearIterator(IGrid grid)
          Create a linear coordinate iterator.
LinearIterator(IGrid grid, Coordinate coordinate)
          Create a linear tile iterator starting from a 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

LinearIterator

public LinearIterator(IGrid grid)
Create a linear coordinate iterator.

Parameters:
grid - the grid

LinearIterator

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

Parameters:
grid - the grid
coordinate - the starting coordinate
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.