private static class ImmutableLeftistHeap.SortedIterator<T extends java.lang.Comparable<T>>
extends java.lang.Object
implements java.util.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
|
private ImmutableHeap<T extends java.lang.Comparable<T>> remainder
public SortedIterator(ImmutableHeap<T> heap)
public boolean hasNext()
public T next()