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

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

public class IteratorWrapper<E>
extends IterationWrapper<E,RuntimeException>
implements CloseableIterator<E>

Abstract superclass for iterators that wrap another iterator. The abstract class IteratorWrapper itself provides default methods that forward method calls to the wrapped iterator, closing itself when exhausted. Subclasses of IteratorWrapper should override some of these methods and may also provide additional methods and fields.


Field Summary
 
Fields inherited from class info.aduna.iteration.IterationWrapper
wrappedIter
 
Fields inherited from class info.aduna.iteration.CloseableIterationBase
logger
 
Constructor Summary
IteratorWrapper(Iterator<? extends E> iter)
          Creates a new IteratorWrapper that operates on the supplied iterator.
 
Method Summary
 
Methods inherited from class info.aduna.iteration.IterationWrapper
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

IteratorWrapper

public IteratorWrapper(Iterator<? extends E> iter)
Creates a new IteratorWrapper that operates on the supplied iterator.

Parameters:
iter - The wrapped iterator for this IteratorWrapper, must not be null.


Copyright © 1997-2008 Aduna. All Rights Reserved.