
E - Element type. Should be Comparable or a Comparator
        needs to be given.public class TopBoundedUpdatableHeap<E> extends UpdatableHeap<E>
k Elements only.| Modifier and Type | Field and Description | 
|---|---|
| protected int | maxsizeMaximum size. | 
IN_TIES, index, NO_VALUEcomparator, queue, size, validSize| Constructor and Description | 
|---|
| TopBoundedUpdatableHeap(int maxsize)Constructor with maximum size only. | 
| TopBoundedUpdatableHeap(int maxsize,
                       Comparator<? super E> comparator)Constructor with maximum size and  Comparator. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected int | compare(Object e,
       Object object)Test if the priority of an object is higher. | 
| int | getMaxSize()Get the maximum size. | 
| protected void | handleOverflow(E e)Handle an overflow in the structure. | 
| void | offerAt(int pos,
       E e)Offer element at the given position. | 
add, clear, heapifyDownComparable, heapifyDownComparator, heapifyUpComparable, heapifyUpComparator, poll, removeAt, removeObject, replaceTopElementcheckHeap, ensureValid, heapifyDown, heapifyUp, heapModified, isEmpty, iterator, peek, resize, sizepublic TopBoundedUpdatableHeap(int maxsize)
maxsize - Maximum sizepublic TopBoundedUpdatableHeap(int maxsize,
                       Comparator<? super E> comparator)
Comparator.maxsize - Maximum sizecomparator - Comparatorpublic void offerAt(int pos,
           E e)
UpdatableHeapofferAt in class UpdatableHeap<E>pos - Positione - Elementprotected int compare(Object e, Object object)
e - New objectobject - Reference objectprotected void handleOverflow(E e)
e - Overflowing element.public int getMaxSize()