K - the key typeV - the value typepublic final class Cursor<K,V>
extends java.lang.Object
implements java.util.Iterator<K>
| Constructor and Description |
|---|
Cursor(RootReference<K,V> rootReference,
K from,
K to) |
Cursor(RootReference<K,V> rootReference,
K from,
K to,
boolean reverse) |
| Modifier and Type | Method and Description |
|---|---|
K |
getKey()
Get the last read key if there was one.
|
V |
getValue()
Get the last read value if there was one.
|
boolean |
hasNext() |
K |
next() |
void |
skip(long n)
Skip over that many entries.
|
public Cursor(RootReference<K,V> rootReference, K from, K to)
public Cursor(RootReference<K,V> rootReference, K from, K to, boolean reverse)
rootReference - of the treefrom - starting key (inclusive), if null start from the first / last keyto - ending key (inclusive), if null there is no boundaryreverse - true if tree should be iterated in key's descending orderpublic boolean hasNext()
hasNext in interface java.util.Iterator<K>public K getKey()
public V getValue()
public void skip(long n)
n - the number of entries to skip