
public class ComparableMinHeap<K extends Comparable<K>> extends ObjectHeap<K>
queueDEFAULT_INITIAL_CAPACITY, modCount, size, validSize| Constructor and Description |
|---|
ComparableMinHeap()
Constructor with default capacity.
|
ComparableMinHeap(int size)
Constructor with initial capacity.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
comp(Object o1,
Object o2)
Compare two objects
|
add, add, clear, ensureValid, heapifyDown, heapifyUp, peek, poll, removeAt, replaceTopElement, resizedesiredSize, heapModified, sizepublic ComparableMinHeap()
public ComparableMinHeap(int size)
size - initial capacityprotected boolean comp(Object o1, Object o2)
comp in class ObjectHeap<K extends Comparable<K>>o1 - First objecto2 - Second object