|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PriorityQueue<E>
A priority queue is an untagged algorithmically positioned collection of comparable elements in which there can be equivalent elements. The primary methods are to add an element, find a maximum priority element, and remove a maximum priority element. In addition, one can remove an element or change the priority of an element through a locator. However, there is no efficient general search method.
Method Summary | |
---|---|
E |
extractMax()
Removes and returns a highest priority element. |
PriorityQueueLocator<E> |
getLocator(E element)
Returns a priority queue locator that has been set to the given element. |
E |
max()
Returns a highest priority element. |
Methods inherited from interface goldman.collection.Collection |
---|
accept, add, addAll, checkRep, clear, contains, ensureCapacity, getCapacity, getComparator, getEquivalentElement, getSize, isEmpty, iterator, remove, retainAll, toArray, toArray, toString, trimToSize |
Method Detail |
---|
E extractMax()
NoSuchElementException
when this collection is empty.
PriorityQueueLocator<E> getLocator(E element)
NoSuchElementException
if there is no equivalent element in this collection.
getLocator
in interface Collection<E>
E max()
NoSuchElementException
when this collection is empty.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |