Class AbstractSeekingIterator<K,V>

java.lang.Object
org.iq80.leveldb.util.AbstractSeekingIterator<K,V>
All Implemented Interfaces:
com.google.common.collect.PeekingIterator<Map.Entry<K,V>>, Iterator<Map.Entry<K,V>>, SeekingIterator<K,V>
Direct Known Subclasses:
DbIterator, InternalTableIterator, Level0Iterator, LevelIterator, MergingIterator, SnapshotSeekingIterator, TableIterator

public abstract class AbstractSeekingIterator<K,V> extends Object implements SeekingIterator<K,V>
  • Field Details

  • Constructor Details

    • AbstractSeekingIterator

      public AbstractSeekingIterator()
  • Method Details

    • seekToFirst

      public final void seekToFirst()
      Description copied from interface: SeekingIterator
      Repositions the iterator so the beginning of this block.
      Specified by:
      seekToFirst in interface SeekingIterator<K,V>
    • seek

      public final void seek(K targetKey)
      Description copied from interface: SeekingIterator
      Repositions the iterator so the key of the next BlockElement returned greater than or equal to the specified targetKey.
      Specified by:
      seek in interface SeekingIterator<K,V>
    • hasNext

      public final boolean hasNext()
      Specified by:
      hasNext in interface Iterator<K>
    • next

      public final Map.Entry<K,V> next()
      Specified by:
      next in interface Iterator<K>
      Specified by:
      next in interface com.google.common.collect.PeekingIterator<K>
    • peek

      public final Map.Entry<K,V> peek()
      Specified by:
      peek in interface com.google.common.collect.PeekingIterator<K>
    • remove

      public final void remove()
      Specified by:
      remove in interface Iterator<K>
      Specified by:
      remove in interface com.google.common.collect.PeekingIterator<K>
    • seekToFirstInternal

      protected abstract void seekToFirstInternal()
    • seekInternal

      protected abstract void seekInternal(K targetKey)
    • getNextElement

      protected abstract Map.Entry<K,V> getNextElement()