Interface PriorityQueue<T>

  • All Superinterfaces:
    java.util.Collection<T>, java.lang.Iterable<T>, java.util.Queue<T>
    All Known Implementing Classes:
    DefaultPriorityQueue, EmptyPriorityQueue

    public interface PriorityQueue<T>
    extends java.util.Queue<T>
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void clearIgnoringIndexes()
      Removes all of the elements from this PriorityQueue without calling PriorityQueueNode.priorityQueueIndex(DefaultPriorityQueue) or explicitly removing references to them to allow them to be garbage collected.
      boolean containsTyped​(T node)
      Same as Collection.contains(Object) but typed using generics.
      void priorityChanged​(T node)
      Notify the queue that the priority for node has changed.
      boolean removeTyped​(T node)
      Same as Collection.remove(Object) but typed using generics.
      • Methods inherited from interface java.util.Collection

        addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.Queue

        add, element, offer, peek, poll, remove
    • Method Detail

      • removeTyped

        boolean removeTyped​(T node)
        Same as Collection.remove(Object) but typed using generics.
      • containsTyped

        boolean containsTyped​(T node)
        Same as Collection.contains(Object) but typed using generics.
      • priorityChanged

        void priorityChanged​(T node)
        Notify the queue that the priority for node has changed. The queue will adjust to ensure the priority queue properties are maintained.
        Parameters:
        node - An object which is in this queue and the priority may have changed.