Package io.permazen.kv.mvstore
Class CursorIterator
java.lang.Object
io.permazen.kv.mvstore.CursorIterator
- All Implemented Interfaces:
CloseableIterator<KVPair>,Closeable,AutoCloseable,Iterator<KVPair>
-
Constructor Summary
ConstructorsConstructorDescriptionCursorIterator(org.h2.mvstore.MVMap<ByteData, ByteData> mvmap, ByteData minKey, ByteData maxKey, boolean reverse) Constructor. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.permazen.util.CloseableIterator
toStreamMethods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
CursorIterator
public CursorIterator(org.h2.mvstore.MVMap<ByteData, ByteData> mvmap, ByteData minKey, ByteData maxKey, boolean reverse) Constructor.- Parameters:
mvmap- the underlyingMVMap(used to implementremove()), or null for read-only operationminKey- minimum key (inclusive), or null for no minimummaxKey- maximum key (exclusive), or null for no maximumreverse- true ifcursoriterates keys in descending order- Throws:
IllegalArgumentException- ifcursoris null
-
-
Method Details
-
getMVMap
Get theMVMapunderlying this instance, if any.- Returns:
- underlying
MVMap, or null if none provided
-
next
-
hasNext
public boolean hasNext() -
remove
public void remove() -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceCloseableIterator<KVPair>
-
toString
-