Package io.deephaven.base
Class RAPriQueue<T>
java.lang.Object
io.deephaven.base.RAPriQueue<T>
A "random-access" priority queue.
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionRAPriQueue
(int initialSize, RAPriQueue.Adapter<? super T> adapter, Class<? super T> elementClass) -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
clear out the queueint
<T2> int
void
Adds an element to the queue, or moves to appropriate place if already thereget
(int index) boolean
isEmpty()
Returns true if the priority queue contains no elements.void
remove an arbitrary element from the queueRemove the top element from the queue, or null if the queue is emptyint
size()
return the priority queue's sizetop()
Return the top of the queue
-
Constructor Details
-
RAPriQueue
public RAPriQueue(int initialSize, RAPriQueue.Adapter<? super T> adapter, Class<? super T> elementClass)
-
-
Method Details
-
size
public int size()return the priority queue's size -
isEmpty
public boolean isEmpty()Returns true if the priority queue contains no elements. -
clear
public void clear()clear out the queue -
enter
Adds an element to the queue, or moves to appropriate place if already there -
top
Return the top of the queue -
removeTop
Remove the top element from the queue, or null if the queue is empty -
remove
remove an arbitrary element from the queue -
dump
-
get
-
dump
-