prefuse.data.util
Class FilterIterator

java.lang.Object
  extended by prefuse.data.util.FilterIterator
All Implemented Interfaces:
java.util.Iterator

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

Iterator over tuples that filters the output by a given predicate.

Author:
jeffrey heer

Constructor Summary
FilterIterator(java.util.Iterator tuples, Predicate p)
          Create a new FilterIterator.
 
Method Summary
 boolean hasNext()
           
 java.lang.Object next()
           
 void remove()
          Not supported.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterIterator

public FilterIterator(java.util.Iterator tuples,
                      Predicate p)
Create a new FilterIterator.

Parameters:
tuples - an iterator over tuples
p - the filter predicate to use
Method Detail

next

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

hasNext

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

remove

public void remove()
Not supported.

Specified by:
remove in interface java.util.Iterator
See Also:
Iterator.remove()


Copyright © 2007 Regents of the University of California