Package org.iq80.leveldb
Interface DBIterator
- All Superinterfaces:
AutoCloseable,Closeable,Iterator<Map.Entry<byte[],byte[]>>
- All Known Implementing Classes:
SeekingIteratorAdapter
-
Method Summary
Modifier and TypeMethodDescriptionbooleanhasPrev()Map.Entry<byte[], byte[]> peekNext()Returns the next element in the iteration, without advancing the iteration.Map.Entry<byte[], byte[]> peekPrev()Map.Entry<byte[], byte[]> prev()voidseek(byte[] key) Repositions the iterator so the key of the next BlockElement returned greater than or equal to the specified targetKey.voidRepositions the iterator so is is at the beginning of the Database.voidRepositions the iterator so it is at the end of of the Database.Methods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, remove
-
Method Details
-
seek
void seek(byte[] key) Repositions the iterator so the key of the next BlockElement returned greater than or equal to the specified targetKey. -
seekToFirst
void seekToFirst()Repositions the iterator so is is at the beginning of the Database. -
peekNext
Map.Entry<byte[],byte[]> peekNext()Returns the next element in the iteration, without advancing the iteration. -
hasPrev
boolean hasPrev()- Returns:
- true if there is a previous entry in the iteration.
-
prev
Map.Entry<byte[],byte[]> prev()- Returns:
- the previous element in the iteration and rewinds the iteration.
-
peekPrev
Map.Entry<byte[],byte[]> peekPrev()- Returns:
- the previous element in the iteration, without rewinding the iteration.
-
seekToLast
void seekToLast()Repositions the iterator so it is at the end of of the Database.
-