T
- type of objects provided by the encapsulated collection of iteratorspublic class SortingIterator<T>
extends java.lang.Object
implements java.util.Iterator<T>
next
method is called.Modifier and Type | Field and Description |
---|---|
protected java.util.Comparator<? super T> |
comparator
The comparator used to sort the provided objects
|
Constructor and Description |
---|
SortingIterator(java.util.Collection<? extends java.util.Iterator<? extends T>> iterators,
java.util.Comparator<? super T> comparator)
Creates a new instance of SortingIterator.
|
protected final java.util.Comparator<? super T> comparator
public SortingIterator(java.util.Collection<? extends java.util.Iterator<? extends T>> iterators, java.util.Comparator<? super T> comparator)
iterators
- the collection of iterators to get the objects fromcomparator
- the comparator used to sort the objects provided by iterators