com.taco.util
Class FilteredIterator

java.lang.Object
  extended by com.taco.util.FilteredIterator
All Implemented Interfaces:
java.util.Iterator

public class FilteredIterator
extends java.lang.Object
implements java.util.Iterator

An iterator over a filtered subset of elements.


Constructor Summary
FilteredIterator(java.util.Iterator it, IObjectFilter filter)
          Construct a new instance based on the argument iterator and the object filter.
 
Method Summary
 boolean hasNext()
           
 java.lang.Object next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilteredIterator

public FilteredIterator(java.util.Iterator it,
                        IObjectFilter filter)
Construct a new instance based on the argument iterator and the object filter. The iterator will be modified by this class so if it is necessary to keep the original state of the iterator, the iterator should be cloned before passing it to this constructor.

Method Detail

hasNext

public final boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator

next

public final java.lang.Object next()
Specified by:
next in interface java.util.Iterator

remove

public final void remove()
Specified by:
remove in interface java.util.Iterator