public class QueuedSortedIterator<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.