|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.btree.filter.TupleFilter<E>
E - The type of the elements visited by the iterator (tuples of some
sort).public abstract class TupleFilter<E>
Filter supporting ITupleIterators.
Warning: Unlike Filter, this class correctly uses a second
Tuple instance to perform filtering. This is necessary since
the Tuple instance for the base ITupleIterator
implementations for the AbstractBTree is reused by next() on each
call and the TupleFilter uses one-step lookahead. Failure to use a
second Tuple instance will result in overwrite of the
current Tuple with data from the lookahead Tuple.
Note: You must specify IRangeQuery.KEYS and/or
IRangeQuery.VALS in order to filter on the keys and/or values
associated with the visited tuples.
Note: YOu must specify IRangeQuery.CURSOR to enabled
Iterator.remove() for a local BTree
| Nested Class Summary | |
|---|---|
protected class |
TupleFilter.Filterator
Implementation class knows how to avoid side-effects from the reuse of the same Tuple instance by the base ITupleIterator impls. |
| Field Summary | |
|---|---|
protected static org.apache.log4j.Logger |
log
|
protected Object |
state
Optional state specified by the ctor. |
| Constructor Summary | |
|---|---|
TupleFilter()
|
|
TupleFilter(Object state)
|
|
| Method Summary | |
|---|---|
ITupleIterator<E> |
filter(Iterator src)
Strengthened return type. |
protected abstract boolean |
isValid(ITuple<E> tuple)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final transient org.apache.log4j.Logger log
protected Object state
| Constructor Detail |
|---|
public TupleFilter()
public TupleFilter(Object state)
| Method Detail |
|---|
public ITupleIterator<E> filter(Iterator src)
ITupleFilter
filter in interface ITupleFilter<E>filter in interface cutthecrap.utils.striterators.IFilterprotected abstract boolean isValid(ITuple<E> tuple)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||