Package org.apache.cassandra.utils.btree
Class FullBTreeSearchIterator<K,V>
java.lang.Object
org.apache.cassandra.utils.btree.FullBTreeSearchIterator<K,V>
- All Implemented Interfaces:
Iterator<V>,BTreeSearchIterator<K,,V> IndexedSearchIterator<K,,V> SearchIterator<K,V>
-
Constructor Summary
ConstructorsConstructorDescriptionFullBTreeSearchIterator(Object[] btree, Comparator<? super K> comparator, BTree.Dir dir) -
Method Summary
Modifier and TypeMethodDescriptioncurrent()booleanhasNext()intnext()Searches "forwards" (in direction of travel) in the iterator for the required key; if this or any key greater has already been returned by the iterator, the method may choose to return null, the correct or incorrect output, or fail an assertion.voidrewind()Reset this Iterator to its starting positionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
FullBTreeSearchIterator
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
-
next
Description copied from interface:SearchIteratorSearches "forwards" (in direction of travel) in the iterator for the required key; if this or any key greater has already been returned by the iterator, the method may choose to return null, the correct or incorrect output, or fail an assertion. it is permitted to search past the end of the iterator, i.e.!hasNext() => next(?) == null- Specified by:
nextin interfaceSearchIterator<K,V> - Parameters:
target- to search for- Returns:
- value associated with key, if present in direction of travel
-
rewind
public void rewind()Reset this Iterator to its starting position- Specified by:
rewindin interfaceBTreeSearchIterator<K,V>
-
current
- Specified by:
currentin interfaceIndexedSearchIterator<K,V> - Returns:
- the value just recently returned by next()
-
indexOfCurrent
public int indexOfCurrent()- Specified by:
indexOfCurrentin interfaceIndexedSearchIterator<K,V> - Returns:
- the index of the value returned by current(), and just returned by next()
-