prefuse.data.util
Class FilterIterable<T extends Tuple<?>>

java.lang.Object
  extended by prefuse.data.util.FilterIterable<T>
All Implemented Interfaces:
java.lang.Iterable<T>

public class FilterIterable<T extends Tuple<?>>
extends java.lang.Object
implements java.lang.Iterable<T>

Iterator over tuples that filters the output by a given predicate. TODO: TIDY THIS CLASS UP!!!

Author:
jeffrey heer

Constructor Summary
FilterIterable(java.lang.Iterable<T> tuples, Predicate p)
          Create a new FilterIterator.
 
Method Summary
static
<T extends Tuple<?>>
FilterIterable<T>
createFilterIterable(java.lang.Iterable<T> tuples, Predicate p)
           
 java.util.Iterator<T> iterator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterIterable

public FilterIterable(java.lang.Iterable<T> tuples,
                      Predicate p)
Create a new FilterIterator.

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

createFilterIterable

public static <T extends Tuple<?>> FilterIterable<T> createFilterIterable(java.lang.Iterable<T> tuples,
                                                                          Predicate p)

iterator

public java.util.Iterator<T> iterator()
Specified by:
iterator in interface java.lang.Iterable<T extends Tuple<?>>


Copyright © 2008 Regents of the University of California