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>
public class IBSkipIterator<K extends Comparable<? super K>,V> extends SkipIterator<K,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
-
Constructor Summary
Constructors Constructor Description IBSkipIterator(SkipSpan<K,V> ss, int index) -
Method Summary
Methods inherited from class net.metanotion.util.skiplist.SkipIterator
add, hasNext, hasPrevious, nextIndex, previousIndex, remove, set
-
Constructor Details
-
Method Details
-
next
- Specified by:
nextin interfaceIterator<K extends Comparable<? super K>>- Specified by:
nextin interfaceListIterator<K extends Comparable<? super K>>- Overrides:
nextin classSkipIterator<K extends Comparable<? super K>,V>- Returns:
- the next value, and advances the index
- Throws:
NoSuchElementExceptionRuntimeException- on IOE
-
nextKey
The key. Does NOT advance the index.- Overrides:
nextKeyin classSkipIterator<K extends Comparable<? super K>,V>- Returns:
- the key for which the value will be returned in the subsequent call to next()
- Throws:
NoSuchElementExceptionRuntimeException- on IOE
-
previous
- Specified by:
previousin interfaceListIterator<K extends Comparable<? super K>>- Overrides:
previousin classSkipIterator<K extends Comparable<? super K>,V>- Returns:
- the previous value, and decrements the index
- Throws:
NoSuchElementExceptionRuntimeException- on IOE
-