com.bigdata.btree.filter
Class TupleFilter<E>
java.lang.Object
cutthecrap.utils.striterators.FilterBase
com.bigdata.btree.filter.TupleFilter<E>
- Type Parameters:
E - The type of the elements visited by the iterator (tuples of some
sort).
- All Implemented Interfaces:
- ITupleFilter<E>, IFilter, IPropertySet, Serializable, Cloneable
- Direct Known Subclasses:
- ElementFilter, SameVariableConstraintTupleFilter, TupleUpdater
public abstract class TupleFilter<E>
- extends FilterBase
- implements ITupleFilter<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
- Version:
- $Id: TupleFilter.java 4388 2011-04-11 13:35:47Z thompsonbry $
- Author:
- Bryan Thompson
- See Also:
- Serialized Form
| Methods inherited from interface cutthecrap.utils.striterators.IFilter |
filter |
TupleFilter
public TupleFilter()
filterOnce
public ITupleIterator<E> filterOnce(Iterator src,
Object context)
- Description copied from class:
FilterBase
- Wrap the source iterator with this filter.
- Specified by:
filterOnce in interface ITupleFilter<E>- Specified by:
filterOnce in class FilterBase
- Parameters:
src - The source iterator.context - The iterator evaluation context.
- Returns:
- The wrapped iterator.
isValid
protected abstract boolean isValid(ITuple<E> tuple)
Copyright © 2006-2012 SYSTAP, LLC. All Rights Reserved.