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

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

public abstract class FilterIterator<E>
extends FilterIteration<E,RuntimeException>
implements CloseableIterator<E>

A CloseableIterator that wraps another iterator, applying a filter on the objects that are returned. Subclasses must implement the accept method to indicate which objects should be returned.


Field Summary
 
Fields inherited from class info.aduna.iteration.IterationWrapper
wrappedIter
 
Fields inherited from class info.aduna.iteration.CloseableIterationBase
logger
 
Constructor Summary
FilterIterator(Iterator<? extends E> iter)
           
 
Method Summary
 
Methods inherited from class info.aduna.iteration.FilterIteration
accept, handleClose, hasNext, next
 
Methods inherited from class info.aduna.iteration.IterationWrapper
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

FilterIterator

public FilterIterator(Iterator<? extends E> iter)
Parameters:
iter -


Copyright © 1997-2008 Aduna. All Rights Reserved.