diva.util
Class FilteredIterator

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

public class FilteredIterator
extends IteratorAdapter

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

Version:
$Revision: 1.8 $
Author:
John Reekie (johnr@eecs.berkeley.edu)

Constructor Summary
FilteredIterator(Iterator i, Filter f)
           
 
Method Summary
 boolean hasNext()
           
 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(Iterator i,
                        Filter f)
Method Detail

hasNext

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

next

public Object next()
Specified by:
next in interface Iterator
Overrides:
next in class IteratorAdapter


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.