net.sf.freecol.common.model
Class Map.WholeMapIterator

java.lang.Object
  extended by net.sf.freecol.common.model.Map.MapIterator
      extended by net.sf.freecol.common.model.Map.WholeMapIterator
All Implemented Interfaces:
java.util.Iterator<Map.Position>
Enclosing class:
Map

public final class Map.WholeMapIterator
extends Map.MapIterator


Field Summary
private  int x
           
private  int y
           
 
Fields inherited from class net.sf.freecol.common.model.Map.MapIterator
directions
 
Constructor Summary
Map.WholeMapIterator()
          Default constructor.
 
Method Summary
 boolean hasNext()
          Determine if the iterator has another position in it.
 Map.Position nextPosition()
          Obtain the next position to iterate over.
 
Methods inherited from class net.sf.freecol.common.model.Map.MapIterator
next, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

x

private int x

y

private int y
Constructor Detail

Map.WholeMapIterator

public Map.WholeMapIterator()
Default constructor.

Method Detail

hasNext

public boolean hasNext()
Determine if the iterator has another position in it.

Returns:
True of there is another position

nextPosition

public Map.Position nextPosition()
                          throws java.util.NoSuchElementException
Obtain the next position to iterate over.

Specified by:
nextPosition in class Map.MapIterator
Returns:
Next position
Throws:
java.util.NoSuchElementException - if last position already returned