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

      public HeapIterator(BinaryHeap<T> binaryHeap)
  • Method Details

    • hasNext

      public boolean hasNext()
      Returns true if the iteration has more elements. (In other words, returns true if next() would return an element rather than throwing an exception.)
      Specified by:
      hasNext in interface Iterator<T extends BinaryHeap.Node>
      Returns:
      true if the iteration has more elements
    • next

      public T next()
      Returns the next element in the iteration.
      Specified by:
      next in interface Iterator<T extends BinaryHeap.Node>
      Returns:
      the next element in the iteration
    • reset

      public void reset()