public abstract class Heap<T> extends Object
Constructor and Description |
---|
Heap(int initialCapacity) |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
compareElements(T elt1,
T elt2) |
void |
insert(T elt) |
boolean |
isEmpty() |
int |
size() |
T |
take() |
String |
toString() |
protected abstract boolean compareElements(T elt1, T elt2)
public int size()
public final boolean isEmpty()
public void insert(T elt)
public T take() throws NoSuchElementException
NoSuchElementException