public class CursorIterator extends Object
KVPair
iterator based on an underlying Cursor
.Modifier and Type | Field and Description |
---|---|
protected org.h2.mvstore.MVMap<byte[],byte[]> |
mvmap |
Constructor and Description |
---|
CursorIterator(org.h2.mvstore.Cursor<byte[],byte[]> cursor,
byte[] maxKey)
Constructor for a read-only instance.
|
CursorIterator(org.h2.mvstore.MVMap<byte[],byte[]> mvmap,
org.h2.mvstore.Cursor<byte[],byte[]> cursor,
byte[] maxKey)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
boundsCheck(byte[] key) |
void |
close() |
protected KVPair |
findNext() |
org.h2.mvstore.MVMap<byte[],byte[]> |
getMVMap()
Get the
MVMap underlying this instance, if any. |
boolean |
hasNext() |
KVPair |
next() |
void |
remove() |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
wrap, wrap
forEachRemaining
public CursorIterator(org.h2.mvstore.Cursor<byte[],byte[]> cursor, byte[] maxKey)
Attempts to invoke remove()
will result in UnsupportedOperationException
.
cursor
- the underlying Cursor
maxKey
- maximum key (exclusive), or null for no maximum (end at the largest key)IllegalArgumentException
- if cursor
is nullpublic CursorIterator(org.h2.mvstore.MVMap<byte[],byte[]> mvmap, org.h2.mvstore.Cursor<byte[],byte[]> cursor, byte[] maxKey)
mvmap
- the underlying MVMap
(used to implement remove()
), or null for read-only operationcursor
- the underlying Cursor
maxKey
- maximum key (exclusive), or null for no maximum (end at the largest key)IllegalArgumentException
- if cursor
is nullprotected KVPair findNext()
protected boolean boundsCheck(byte[] key)
public org.h2.mvstore.MVMap<byte[],byte[]> getMVMap()
MVMap
underlying this instance, if any.MVMap
, or null if none providedpublic void close()
close
in interface CloseableIterator<KVPair>
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2022. All rights reserved.