- 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 Summary
Constructors
-
Method Summary
boolean
boolean
boolean
boolean
int
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
IndexedPriorityQueue
public IndexedPriorityQueue()
-
Method Details
-
addOrUpdate
public boolean addOrUpdate(E element,
long priority)
-
contains
public boolean contains(E element)
-
remove
public boolean remove(E element)
-
-
-
-
isEmpty
public boolean isEmpty()
-