wyvern.kernel.maps
Class GameHashIterator

java.lang.Object
  extended bywyvern.kernel.maps.GameHashIterator
All Implemented Interfaces:
java.util.Iterator

public final class GameHashIterator
extends java.lang.Object
implements java.util.Iterator

This class does a straight MxN search of every square in the requested rectangle.

Version:
1.0, Jan 18, 1998
Author:
Steve Yegge

Constructor Summary
GameHashIterator(GameHashMap map, Rectangle r)
          Constructs a new one over the specified rectangle.
 
Method Summary
 boolean hasNext()
          Returns true if there's another item available in the iteration.
 java.lang.Object next()
          Returns the next item.
 void remove()
          Removes the last item returned by next();
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GameHashIterator

public GameHashIterator(GameHashMap map,
                        Rectangle r)
Constructs a new one over the specified rectangle.

Parameters:
map - the game map
r - the rectangle to iterate
Method Detail

hasNext

public boolean hasNext()
Returns true if there's another item available in the iteration.

Specified by:
hasNext in interface java.util.Iterator
Returns:
true if more elements

next

public java.lang.Object next()
Returns the next item.

Specified by:
next in interface java.util.Iterator

remove

public void remove()
Removes the last item returned by next();

Specified by:
remove in interface java.util.Iterator