com.trigonic.jrobotx.util
Class AbstractIterator<E>

java.lang.Object
  extended by com.trigonic.jrobotx.util.AbstractIterator<E>
All Implemented Interfaces:
java.util.Iterator<E>
Direct Known Subclasses:
RecordIterator, URLEncodeTokenizer

public abstract class AbstractIterator<E>
extends java.lang.Object
implements java.util.Iterator<E>

An abstract Iterator. This implementation treats null as a marker and cannot support iteration sequences that can return it as a valid value.


Constructor Summary
AbstractIterator()
           
 
Method Summary
protected abstract  E getNext()
          Implement this to return the next value in the iteration, or null if none remain.
 boolean hasNext()
           
 E next()
           
 void remove()
           
protected  void removeLast(E last)
          Override this to support remove().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractIterator

public AbstractIterator()
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<E>

next

public E next()
Specified by:
next in interface java.util.Iterator<E>

remove

public void remove()
Specified by:
remove in interface java.util.Iterator<E>

getNext

protected abstract E getNext()
Implement this to return the next value in the iteration, or null if none remain.


removeLast

protected void removeLast(E last)
Override this to support remove().