Package net.metanotion.io.block.index
Class IBSkipIterator<K extends Comparable<? super K>,V>
java.lang.Object
net.metanotion.util.skiplist.SkipIterator<K,V>
net.metanotion.io.block.index.IBSkipIterator<K,V>
- All Implemented Interfaces:
Iterator<V>
,ListIterator<V>
I2P
Overridden to load the span when required and null out the keys and values
when the iterator leaves the span.
If the caller does not iterate all the way through, the last span
will remain in memory.
-
Field Summary
Fields inherited from class net.metanotion.util.skiplist.SkipIterator
index, ss
-
Constructor Summary
-
Method Summary
Methods inherited from class net.metanotion.util.skiplist.SkipIterator
add, hasNext, hasPrevious, nextIndex, previousIndex, remove, set
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
IBSkipIterator
-
-
Method Details
-
next
- Specified by:
next
in interfaceIterator<K extends Comparable<? super K>>
- Specified by:
next
in interfaceListIterator<K extends Comparable<? super K>>
- Overrides:
next
in classSkipIterator<K extends Comparable<? super K>,
V> - Returns:
- the next value, and advances the index
- Throws:
NoSuchElementException
RuntimeException
- on IOE
-
nextKey
The key. Does NOT advance the index.- Overrides:
nextKey
in classSkipIterator<K extends Comparable<? super K>,
V> - Returns:
- the key for which the value will be returned in the subsequent call to next()
- Throws:
NoSuchElementException
RuntimeException
- on IOE
-
previous
- Specified by:
previous
in interfaceListIterator<K extends Comparable<? super K>>
- Overrides:
previous
in classSkipIterator<K extends Comparable<? super K>,
V> - Returns:
- the previous value, and decrements the index
- Throws:
NoSuchElementException
RuntimeException
- on IOE
-