Package com.github.tommyettinger.ds
Class BinaryHeap.HeapIterator<T extends BinaryHeap.Node>
java.lang.Object
com.github.tommyettinger.ds.BinaryHeap.HeapIterator<T>
- All Implemented Interfaces:
Iterator<T>
- Enclosing class:
- BinaryHeap<T extends BinaryHeap.Node>
public static class BinaryHeap.HeapIterator<T extends BinaryHeap.Node>
extends Object
implements Iterator<T>
-
Constructor Details
-
HeapIterator
-
-
Method Details
-
hasNext
public boolean hasNext()Returnstrueif the iteration has more elements. (In other words, returnstrueifnext()would return an element rather than throwing an exception.)- Specified by:
hasNextin interfaceIterator<T extends BinaryHeap.Node>- Returns:
trueif the iteration has more elements
-
next
Returns the next element in the iteration.- Specified by:
nextin interfaceIterator<T extends BinaryHeap.Node>- Returns:
- the next element in the iteration
-
reset
public void reset()
-