diva.util
Class FilteredIterator

java.lang.Object
  extended bydiva.util.IteratorAdapter
      extended bydiva.util.FilteredIterator
All Implemented Interfaces:
java.util.Iterator

public class FilteredIterator
extends IteratorAdapter

An iterator that takes another iterator, and applies a filter to each element that it gets.

Version:
$Id: FilteredIterator.java,v 1.6 2004/04/13 18:49:01 cxh Exp $
Author:
John Reekie

Constructor Summary
FilteredIterator(java.util.Iterator i, Filter f)
           
 
Method Summary
 boolean hasNext()
           
 java.lang.Object next()
           
 
Methods inherited from class diva.util.IteratorAdapter
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 i,
                        Filter f)
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator
Overrides:
hasNext in class IteratorAdapter

next

public java.lang.Object next()
Specified by:
next in interface java.util.Iterator
Overrides:
next in class IteratorAdapter