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
ConstructorDescriptionCursorIterator
(org.h2.mvstore.MVMap<byte[], byte[]> mvmap, byte[] minKey, byte[] maxKey, boolean reverse) Constructor. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.permazen.util.CloseableIterator
toStream
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
CursorIterator
public CursorIterator(org.h2.mvstore.MVMap<byte[], byte[]> mvmap, byte[] minKey, byte[] 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 ifcursor
iterates keys in descending order- Throws:
IllegalArgumentException
- ifcursor
is null
-
-
Method Details
-
getMVMap
public org.h2.mvstore.MVMap<byte[],byte[]> getMVMap()Get theMVMap
underlying 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceCloseableIterator<KVPair>
-
toString
-