prefuse.data.util
Class FilterIteratorFactory

java.lang.Object
  extended by prefuse.data.util.FilterIteratorFactory

public class FilterIteratorFactory
extends java.lang.Object

Factory class that creates optimized filter iterators. When possible, this factory will attempt to create an optimized query plan by using available indexes, in many incrasing performance by only visiting the tuples which will pass the filter condition.

Author:
jeffrey heer

Constructor Summary
FilterIteratorFactory()
           
 
Method Summary
protected static IntIterator getAndIterator(Table t, AndPredicate ap)
           
protected static IntIterator getColumnIterator(Table t, java.lang.String field, boolean val)
           
protected static IntIterator getComparisonIterator(Table t, ComparisonPredicate cp)
           
protected static IntIterator getOptimizedIterator(Table t, Predicate p)
          Get an optimized iterator over the rows of a table, if possible.
protected static IntIterator getOrIterator(Table t, OrPredicate op)
           
protected static IntIterator getRangeIterator(Table t, RangePredicate rp)
           
static IntIterator rows(Table t, Predicate p)
          Get a filtered iterator over the rows in the given table, filtered by the given predicate.
static java.util.Iterator tuples(TupleSet ts, Predicate p)
          Get a filtered iterator over the tuples in the given set, filtered by the given predicate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterIteratorFactory

public FilterIteratorFactory()
Method Detail

tuples

public static java.util.Iterator tuples(TupleSet ts,
                                        Predicate p)
Get a filtered iterator over the tuples in the given set, filtered by the given predicate.

Parameters:
ts - the TupleSet to iterate over
p - the filter predicate
Returns:
a filtered iterator over the tuples

rows

public static IntIterator rows(Table t,
                               Predicate p)
Get a filtered iterator over the rows in the given table, filtered by the given predicate.

Parameters:
t - the Table to iterate over
p - the filter predicate
Returns:
a filtered iterator over the table rows

getOptimizedIterator

protected static IntIterator getOptimizedIterator(Table t,
                                                  Predicate p)
Get an optimized iterator over the rows of a table, if possible.

Parameters:
t - the Table to iterator over
p - the filter predicate
Returns:
an optimized iterator, or null if no optimization was found

getColumnIterator

protected static IntIterator getColumnIterator(Table t,
                                               java.lang.String field,
                                               boolean val)

getOrIterator

protected static IntIterator getOrIterator(Table t,
                                           OrPredicate op)

getAndIterator

protected static IntIterator getAndIterator(Table t,
                                            AndPredicate ap)

getComparisonIterator

protected static IntIterator getComparisonIterator(Table t,
                                                   ComparisonPredicate cp)

getRangeIterator

protected static IntIterator getRangeIterator(Table t,
                                              RangePredicate rp)


Copyright © 2007 Regents of the University of California