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