Package io.permazen.kv.mvstore
Class MVCursorIterator
Converts a
Cursor
from an Iterator<byte[]>
with inclusive upper bound
into an Iterator<KVPair>
with exclusive upper bound.-
Constructor Summary
ConstructorDescriptionMVCursorIterator
(org.h2.mvstore.Cursor<byte[], byte[]> cursor, byte[] maxKey, boolean reverse) Constructor. -
Method Summary
Methods inherited from class com.google.common.collect.AbstractIterator
endOfData, hasNext, next, peek
Methods inherited from class com.google.common.collect.UnmodifiableIterator
remove
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
MVCursorIterator
public MVCursorIterator(org.h2.mvstore.Cursor<byte[], byte[]> cursor, byte[] maxKey, boolean reverse) Constructor.- Parameters:
cursor
- the underlyingCursor
maxKey
- maximum key (exclusive), or null for no maximumreverse
- true ifcursor
iterates keys in descending order- Throws:
IllegalArgumentException
- ifcursor
is null
-
-
Method Details
-
getMaxKey
public byte[] getMaxKey() -
isReverse
public boolean isReverse() -
computeNext
- Specified by:
computeNext
in classAbstractIterator<KVPair>
-
toString
-