private static class ImmutableLeftistHeap.UnsortedIterator<T extends java.lang.Comparable<T>>
extends java.lang.Object
implements java.util.Iterator<T>
Modifier and Type | Field and Description |
---|---|
private java.util.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
|
private final java.util.Stack<ImmutableLeftistHeap.Node<T extends java.lang.Comparable<T>>> remainder
public UnsortedIterator(ImmutableLeftistHeap<T> heap)
private void push(ImmutableLeftistHeap<T> heap)
public boolean hasNext()
public T next()