public interface IdentifiablePriorityQueue<E extends Identifiable & java.lang.Comparable> extends PriorityQueue<E>
Modifier and Type | Method and Description |
---|---|
E |
getElement(long id)
Returns the element with the input ID, if the element exists; otherwise, returns null.
|
E |
replaceElement(long id, E newElement)
Replace the old element of the specified id with a new element.
|
E getElement(long id)
id
- ID of the elementE replaceElement(long id, E newElement)
id
- ID of the old elementnewElement
- new element