Class IndexedPriorityQueue<E>

  • All Implemented Interfaces:
    Iterable<E>

    public final class IndexedPriorityQueue<E>
    extends Object
    A priority queue with constant time contains(E) and log time remove(E) Ties are broken by insertion order
    • Constructor Detail

      • IndexedPriorityQueue

        public IndexedPriorityQueue()
    • Method Detail

      • addOrUpdate

        public boolean addOrUpdate​(E element,
                                   long priority)
      • contains

        public boolean contains​(E element)
      • remove

        public boolean remove​(E element)
      • poll

        public E poll()
      • peek

        public E peek()
      • size

        public int size()
      • isEmpty

        public boolean isEmpty()