Interface IdentifiablePriorityQueue<E extends Identifiable & java.lang.Comparable>

    • Method Detail

      • getElement

        E getElement​(long id)
        Returns the element with the input ID, if the element exists; otherwise, returns null.
        Parameters:
        id - ID of the element
        Returns:
      • replaceElement

        E replaceElement​(long id,
                         E newElement)
        Replace the old element of the specified id with a new element. The ID of the new element does not need to be the same as the old element. If the old element does not exist in the queue, then simply insert the new element into the queue.
        Parameters:
        id - ID of the old element
        newElement - new element
        Returns: