@Test public void isEmptyReturnsTrueWithEmptyHeap() { Heap<Integer> heap = new SimpleHeapImpl<Integer>(minHeapComparator); assertTrue(heap.isEmpty()); }
@Override public boolean isEmpty() { return size() == 0; }
SimpleHeapImpl implements Heap<T> { @Override public boolean isEmpty() { return size() == 0; } }
SimpleHeapImpl implements Heap<T> { @Override public boolean isEmpty() { return size() == 0; } SimpleHeapImpl(Comparator<T> comparator);  SimpleHeapImpl(List<T> list, Comparator<T> comparator);  SimpleHeapImpl(T[] array, Comparator<T> comparator); }
SimpleHeapImpl implements Heap<T> { @Override public boolean isEmpty() { return size() == 0; } SimpleHeapImpl(Comparator<T> comparator);  SimpleHeapImpl(List<T> list, Comparator<T> comparator);  SimpleHeapImpl(T[] array, Comparator<T> comparator); @Override int size(); @Override T peek(); @Override T pop(); @Override void add(T element); @Override boolean isEmpty(); }
SimpleHeapImpl implements Heap<T> { @Override public boolean isEmpty() { return size() == 0; } SimpleHeapImpl(Comparator<T> comparator);  SimpleHeapImpl(List<T> list, Comparator<T> comparator);  SimpleHeapImpl(T[] array, Comparator<T> comparator); @Override int size(); @Override T peek(); @Override T pop(); @Override void add(T element); @Override boolean isEmpty();  }