public class IntegerMaxHeap extends IntegerHeap
queue
DEFAULT_INITIAL_CAPACITY, modCount, size, validSize
Constructor and Description |
---|
IntegerMaxHeap()
Constructor with default capacity.
|
IntegerMaxHeap(int size)
Constructor with initial capacity.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
comp(int o1,
int o2)
Compare two objects
|
add, add, clear, ensureValid, heapifyDown, heapifyUp, peek, poll, removeAt, replaceTopElement, resize
desiredSize, heapModified, size
public IntegerMaxHeap()
public IntegerMaxHeap(int size)
size
- initial capacityprotected boolean comp(int o1, int o2)
comp
in class IntegerHeap
o1
- First objecto2
- Second object