Class MergeSortedIterators<T>
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.document.util.MergeSortedIterators<T>
-
- Type Parameters:
T- the entry type
- All Implemented Interfaces:
java.util.Iterator<T>
public abstract class MergeSortedIterators<T> extends java.lang.Object implements java.util.Iterator<T>MergeSortedIteratorsis a specialized implementation of a merge sort of already sorted iterators of some type of comparable elements. The input iterators must return the elements in sorted order according to the provided Comparator. In addition the sequence of iterators must also be sorted in a way that the first element of the next iterator is greater than the first element of the previous iterator.
-
-
Constructor Summary
Constructors Constructor Description MergeSortedIterators(java.util.Comparator<T> comparator)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.Stringdescription()Provides details about this iteratorbooleanhasNext()Tnext()abstract java.util.Iterator<T>nextIterator()voidremove()
-
-
-
Constructor Detail
-
MergeSortedIterators
public MergeSortedIterators(java.util.Comparator<T> comparator)
-
-
Method Detail
-
nextIterator
public abstract java.util.Iterator<T> nextIterator()
- Returns:
- the next
Iteratorornullif there is none.
-
description
public java.lang.String description()
Provides details about this iterator
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfacejava.util.Iterator<T>
-
remove
public void remove()
- Specified by:
removein interfacejava.util.Iterator<T>
-
-