private static class ImmutableLeftistHeap.SortedIterator<T extends Comparable<T>> extends Object implements Iterator<T>
Modifier and Type | Field and Description |
---|---|
private ImmutableHeap<T> |
remainder |
Constructor and Description |
---|
SortedIterator(ImmutableHeap<T> heap) |
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
T |
next() |
void |
remove()
throw an unsupported operation exception as leftist heaps are immutable
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
private ImmutableHeap<T extends Comparable<T>> remainder
public SortedIterator(ImmutableHeap<T> heap)
public boolean hasNext()
hasNext
in interface Iterator<T extends Comparable<T>>
public void remove()
remove
in interface Iterator<T extends Comparable<T>>