@Test public void iterator() { Heap<Integer> h = new Heap<>(data, MIN); assertTrue("should have next element", h.iterator().hasNext()); }
public Iterator<T> iterator() { return ImmutableList.copyOf(data).iterator(); }
Heap { public Iterator<T> iterator() { return ImmutableList.copyOf(data).iterator(); } }
Heap { public Iterator<T> iterator() { return ImmutableList.copyOf(data).iterator(); } Heap(List<T> data, Comparator<T> comparator); }
Heap { public Iterator<T> iterator() { return ImmutableList.copyOf(data).iterator(); } Heap(List<T> data, Comparator<T> comparator); void heapify(); int size(); boolean isEmpty(); T extreme(); T extractExtreme(); Heap<T> insert(T item); Iterator<T> iterator(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); }
Heap { public Iterator<T> iterator() { return ImmutableList.copyOf(data).iterator(); } Heap(List<T> data, Comparator<T> comparator); void heapify(); int size(); boolean isEmpty(); T extreme(); T extractExtreme(); Heap<T> insert(T item); Iterator<T> iterator(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }