Package com.complexible.common.collect
Class QueuedSortedIterator<T>
java.lang.Object
com.google.common.collect.UnmodifiableIterator<T>
com.complexible.common.collect.QueuedSortedIterator<T>
- All Implemented Interfaces:
Iterator<T>
public class QueuedSortedIterator<T>
extends com.google.common.collect.UnmodifiableIterator<T>
A sorted iterator wrapper to which elements can be added dynamically. Added element will be available to
next() function in the correct order. Elements can be added in any order and may even be less than the
elements that are already returned by the iterator though that will make the overall iteration unsorted.- Since:
- 2.e
- Version:
- 2.e
- Author:
- Evren Sirin
-
Constructor Summary
ConstructorsConstructorDescriptionQueuedSortedIterator(com.google.common.collect.PeekingIterator<T> theIt, Comparator<T> theComparator) QueuedSortedIterator(com.google.common.collect.PeekingIterator<T> theIt, PriorityQueue<T> theQueue) -
Method Summary
Methods inherited from class com.google.common.collect.UnmodifiableIterator
removeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
QueuedSortedIterator
public QueuedSortedIterator(com.google.common.collect.PeekingIterator<T> theIt, Comparator<T> theComparator) -
QueuedSortedIterator
public QueuedSortedIterator(com.google.common.collect.PeekingIterator<T> theIt, PriorityQueue<T> theQueue)
-
-
Method Details
-
add
-
hasNext
public boolean hasNext() -
next
-