|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.btree.filter.TupleFilter.Filterator
E - 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 ITupleIterator<E> |
src
The source iterator. |
| Constructor Summary | |
|---|---|
TupleFilter.Filterator(ITupleIterator<E> src)
|
|
| Method Summary | |
|---|---|
protected ITuple |
getNext()
One step look ahead. |
boolean |
hasNext()
|
ITuple<E> |
next()
Advance the iterator and return the ITuple from which you can
extract the data and metadata for next entry. |
void |
remove()
Note: remove() is supported iff the source iterator is an
ITupleCursor and the underlying AbstractBTree allows
modification. |
protected void |
visit(ITuple<E> tuple)
Hook for subclasses. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final ITupleIterator<E> src
| Constructor Detail |
|---|
public TupleFilter.Filterator(ITupleIterator<E> src)
| Method Detail |
|---|
public boolean hasNext()
hasNext in interface Iterator<ITuple<E>>public ITuple<E> next()
ITupleIteratorITuple from which you can
extract the data and metadata for next entry.
Note: An ITupleIterators will generally return the same
ITuple reference on on each invocation of this method. The caller
is responsible for copying out any data or metadata of interest before
calling ITupleIterator.next() again. See TupleFilter which is aware of
this and can be used to stack filters safely.
next in interface ITupleIterator<E>next in interface Iterator<ITuple<E>>ITuple containing the data and metadata for the
current index entry.protected void visit(ITuple<E> tuple)
next() returns. The default implementation is a NOP.
tuple - The tuple that will be visited.public void remove()
remove() is supported iff the source iterator is an
ITupleCursor and the underlying AbstractBTree allows
modification.
Note: The filter imposes a one-step lookahead means that invoking
remove() on the source iterator would cause the wrong
element to be removed from the source iterator. Therefore this
operation is disabled unless the ITupleCursor.
ITupleCursor is safe for traversal with concurrent
modification, so we can just remove the key from the source index.
Note: An ITupleCursor can be requested either at the
top-level or by specifying IRangeQuery.CURSOR to
TupleFilter#TupleFilter(int).
remove in interface Iterator<ITuple<E>>UnsupportedOperationException - unless the source iterator is an ITupleCursor.protected ITuple getNext()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||