|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.btree.LeafTupleIterator<E>
public class LeafTupleIterator<E>
Visits the values of a Leaf in the external key ordering. There is
exactly one value per key for a leaf node.
| Constructor Summary | |
|---|---|
LeafTupleIterator(Leaf leaf)
|
|
LeafTupleIterator(Leaf leaf,
AbstractTuple<E> tuple)
|
|
LeafTupleIterator(Leaf leaf,
AbstractTuple<E> tuple,
byte[] fromKey,
byte[] toKey)
|
|
| Method Summary | |
|---|---|
boolean |
hasNext()
Examines the entry at index. |
ITuple<E> |
next()
Advance the iterator and return the ITuple from which you can
extract the data and metadata for next entry. |
void |
remove()
This operation is not supported. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LeafTupleIterator(Leaf leaf)
public LeafTupleIterator(Leaf leaf,
AbstractTuple<E> tuple)
public LeafTupleIterator(Leaf leaf,
AbstractTuple<E> tuple,
byte[] fromKey,
byte[] toKey)
leaf - The leaf whose entries will be traversed (required).tuple - Used to hold the output values (required).fromKey - The first key whose entry will be visited or null
if the lower bound on the key traversal is not constrained.toKey - The first key whose entry will NOT be visited or
null if the upper bound on the key traversal is
not constrained.flags - Flags specifying whether the keys and/or values will be
materialized.
IllegalArgumentException - if fromKey is given and is greater than toKey.| Method Detail |
|---|
public boolean hasNext()
index. If it passes the criteria for an
entry to visit then return true. Otherwise increment the index
until either all entries in this leaf have been exhausted -or- the an
entry is identified that passes the various criteria.
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.public void remove()
Note: There are two ways in which you can achieve the semantics of
remove(). One is to use an ITupleCursor, which
correctly handles traversal with concurrent modification. The other is to
use a AbstractChunkedTupleIterator, which buffers the tuples
first and then does a "delete" behind in order to avoid concurrent
modification during traversal.
remove in interface Iterator<ITuple<E>>UnsupportedOperationException - always.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||