info.aduna.collections.iterators
Class LookAheadIterator<E>

java.lang.Object
  extended by info.aduna.iteration.CloseableIterationBase<E,X>
      extended by info.aduna.iteration.LookAheadIteration<E,RuntimeException>
          extended by info.aduna.collections.iterators.LookAheadIterator<E>
All Implemented Interfaces:
CloseableIterator<E>, CloseableIteration<E,RuntimeException>, Iteration<E,RuntimeException>, Closeable, Iterator<E>

public abstract class LookAheadIterator<E>
extends LookAheadIteration<E,RuntimeException>
implements CloseableIterator<E>

An iterator that looks one element ahead, if necessary, to handle calls to LookAheadIteration.hasNext(). This is a convenient super class for iterators that have no easy way to tell if there are any more results, but still should implement the java.util.Iterator interface.


Field Summary
 
Fields inherited from class info.aduna.iteration.CloseableIterationBase
logger
 
Constructor Summary
LookAheadIterator()
           
 
Method Summary
 
Methods inherited from class info.aduna.iteration.LookAheadIteration
getNextElement, handleClose, hasNext, next, remove
 
Methods inherited from class info.aduna.iteration.CloseableIterationBase
close, isClosed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface info.aduna.collections.iterators.CloseableIterator
close
 
Methods inherited from interface java.util.Iterator
hasNext, next, remove
 

Constructor Detail

LookAheadIterator

public LookAheadIterator()


Copyright © 1997-2008 Aduna. All Rights Reserved.