public abstract class PersistitMap.ExchangeIterator<E> extends Object implements Iterator<E>
java.util.Iterator
using an underlying Persistit
tree as the source of keys and values to be traversed. In addition to the
inherited methods of java.util.Iterator
, this class also
implements a facility to apply a KeyFilter
to restrict the set of
keys over it will iterate. See
setFilterTerm(KeyFilter.Term)
and
getKeyFilter()
for details.Modifier and Type | Method and Description |
---|---|
Key.Direction |
getDirection() |
KeyFilter |
getKeyFilter()
Returns the
KeyFilter for this iterator, or
null if there is none. |
boolean |
hasNext() |
protected void |
nextEntry() |
void |
remove() |
void |
setDirection(Key.Direction direction)
Set the desired traversal direction of this Iterator.
|
void |
setFilterTerm(KeyFilter.Term term)
Set up a
KeyFilter for this Iterator . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining, next
public void setDirection(Key.Direction direction)
Key.GT
(ascending) and
Key.LT
(descending) are allowed.direction
- The directionpublic Key.Direction getDirection()
public KeyFilter getKeyFilter()
KeyFilter
for this iterator, or
null
if there is none.KeyFilter
, or
null
if there is none.public void setFilterTerm(KeyFilter.Term term)
Set up a KeyFilter
for this Iterator
. When
set, the hasNext()
and Iterator.next()
operations return only
those keys, values or entries for records having keys selected by the
supplied KeyFilter.Term
. Note that setting the filter affects
subsequent hasNext
or next
operations, but
does not modify the current key, nor does it affect the behavior of
remove()
or
PersistitMap.ExchangeEntry.setValue(V)
for the
current entry.
term
- If null
, clears the KeyFilter
for this iterator. Otherwise, sets up a filter based on
the supplied Term
.protected void nextEntry()
Copyright © 2025 Open Identity Platform Community. All rights reserved.