|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
T - the type of the items stored in the queue.P - the type of the priority of each item.public interface UpdatablePriorityQueue<T,P extends java.lang.Comparable<? super P>>
An interface for the Updatable Priority Queue ADT, which allows the user to query and change the priority of items in the queue. Each implementation of this interface shall define a special "sentinel" priority value that indicates an item is not in the queue. Setting an item's priority to this value in fact removes it from the queue. Removing a non-member item is a no-op. In addition, adding an item may be accomplished, from the user side, simply by setting its priority to a non-sentinel value.
| Method Summary | |
|---|---|
P |
getPriority(T item)
Returns the priority of the given item, or, if that item is not in the queue, an implementation-specific sentinel value. |
P |
nonMemberPriority()
Returns the sentinel value used by getPriority() to indicate items not currently stored in the queue. |
boolean |
setPriority(T item,
P newPriority)
Sets the priority of a given item. |
| Methods inherited from interface PriorityQueue |
|---|
add, clear, isEmpty, peek, remove |
| Method Detail |
|---|
boolean setPriority(T item,
P newPriority)
P nonMemberPriority()
P getPriority(T item)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||