
E - Object typepublic class TiedTopBoundedUpdatableHeap<E> extends TopBoundedUpdatableHeap<E>
TopBoundedHeap, discarding elements
 with the highest value. However, this variation keeps a list of tied
 elements.| Modifier and Type | Field and Description | 
|---|---|
| private List<E> | tiesList to keep ties in. | 
maxsizeIN_TIES, index, NO_VALUEcomparator, queue, size, validSize| Constructor and Description | 
|---|
| TiedTopBoundedUpdatableHeap(int maxsize)Constructor for Comparable objects. | 
| TiedTopBoundedUpdatableHeap(int maxsize,
                           Comparator<? super E> comparator)Constructor with comparator. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | clear()Clear the heap. | 
| protected void | handleOverflow(E e)Handle an overflow in the structure. | 
| Iterator<E> | iterator() | 
| void | offerAt(int pos,
       E e)Offer element at the given position. | 
| E | peek()Peek at the top element. | 
| E | poll()Remove the top element. | 
| int | size()Get the heap size. | 
compare, getMaxSizeadd, heapifyDownComparable, heapifyDownComparator, heapifyUpComparable, heapifyUpComparator, removeAt, removeObject, replaceTopElementcheckHeap, ensureValid, heapifyDown, heapifyUp, heapModified, isEmpty, resizepublic TiedTopBoundedUpdatableHeap(int maxsize,
                           Comparator<? super E> comparator)
maxsize - Maximum size of heap (unless tied)comparator - Comparatorpublic TiedTopBoundedUpdatableHeap(int maxsize)
maxsize - Maximum size of heap (unless tied)public int size()
Heappublic void clear()
Heapclear in class UpdatableHeap<E>public void offerAt(int pos,
           E e)
UpdatableHeapofferAt in class TopBoundedUpdatableHeap<E>pos - Positione - Elementpublic E poll()
Heappoll in class UpdatableHeap<E>protected void handleOverflow(E e)
TopBoundedUpdatableHeaphandleOverflow in class TopBoundedUpdatableHeap<E>e - Overflowing element.