E
- The type of the elements visited by the iterator (tuples of some
sort).public abstract class TupleFilter<E> extends FilterBase implements ITupleFilter<E>
Filter supporting ITupleIterator
s.
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
Modifier and Type | Class and Description |
---|---|
static class |
TupleFilter.TupleFilterator<E>
Implementation class knows how to avoid side-effects from the reuse of
the same
Tuple instance by the base ITupleIterator impls. |
Constructor and Description |
---|
TupleFilter() |
Modifier and Type | Method and Description |
---|---|
ITupleIterator<E> |
filterOnce(Iterator src,
Object context)
Wrap the source iterator with this filter.
|
protected abstract boolean |
isValid(ITuple<E> tuple) |
addFilter, filter, getProperty, getRequiredProperty, setProperty, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getProperty
public ITupleIterator<E> filterOnce(Iterator src, Object context)
FilterBase
filterOnce
in interface ITupleFilter<E>
filterOnce
in class FilterBase
src
- The source iterator.context
- The iterator evaluation context.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.