|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
E
- the element type for elements queuedpublic interface IntPriorityQueue<E>
This class represents a priority queue, that is a queue in which elements can
be held and from which they can be retrieved by priority. For this purpose,
each element has a priority associated with it that determines when in
relation to the other elements in the queue this element should be retrieved.
Priorities are int
s here.
Method Summary | |
---|---|
void |
addElementFirst(E elt,
int priority)
This function adds the given element at the given priority to this priority queue. |
void |
addElementLast(E elt,
int priority)
This function adds the given element at the given priority to this priority queue. |
boolean |
containsElementAt(E elt,
int priority)
This function tests whether the given element is currently in this queue at the given priority. |
boolean |
removeElementAt(E elt,
int priority)
This function attempts to remove the given element at the given priority from this priority queue. |
Methods inherited from interface inf.util.PriorityQueue |
---|
addElementFirst, addElementLast, containsElementAt, getHighestFirst, getHighestLast, getLowestFirst, getLowestLast, isEmpty, length, removeElementAt, removeHighestFirst, removeHighestLast, removeLowestFirst, removeLowestLast |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Method Detail |
---|
void addElementFirst(E elt, int priority)
This function adds the given element at the given priority to this priority queue. If there are already elements queued at this priority, the new element will be queued at the front.
elt
- the element to be added to this IntPriorityQueuepriority
- the priority with which the element is to be queuedvoid addElementLast(E elt, int priority)
This function adds the given element at the given priority to this priority queue. If there are already elements queued at this priority, the new element will be queued at the end.
elt
- the element to be added to this IntPriorityQueuepriority
- the priority with which the element is to be queuedboolean containsElementAt(E elt, int priority)
This function tests whether the given element is currently in this queue at the given priority.
elt
- the element to be tested forpriority
- the priority at which it should be queued
boolean removeElementAt(E elt, int priority)
This function attempts to remove the given element at the given priority from this priority queue. Whether the removal was successful is returned.
elt
- the element to be removed from this IntPriorityQueuepriority
- the priority at which the element is currently queued
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |