public interface IdentifiablePriorityQueue extends PriorityQueue
Modifier and Type | Interface and Description |
---|---|
static interface |
IdentifiablePriorityQueue.Identifiable
This interface defines an element in the priority queue.
|
Modifier and Type | Method and Description |
---|---|
IdentifiablePriorityQueue.Identifiable |
getElement(long id)
Returns the element with the input ID, if the element exists; otherwise, returns null.
|
IdentifiablePriorityQueue.Identifiable |
replaceElement(long id, IdentifiablePriorityQueue.Identifiable newElement)
Replace the old element of the specified id with a new element.
|
IdentifiablePriorityQueue.Identifiable getElement(long id)
id
- ID of the elementIdentifiablePriorityQueue.Identifiable replaceElement(long id, IdentifiablePriorityQueue.Identifiable newElement)
id
- ID of the old elementnewElement
- new element