Package io.deephaven.base
Class RAPriQueue<T>
java.lang.Object
io.deephaven.base.RAPriQueue<T>
A "random-access" priority queue.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionRAPriQueue(int initialSize, RAPriQueue.Adapter<? super T> adapter, Class<? super T> elementClass) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()clear out the queueint<T2> intvoidAdds an element to the queue, or moves to appropriate place if already thereget(int index) booleanisEmpty()Returns true if the priority queue contains no elements.voidremove an arbitrary element from the queueRemove the top element from the queue, or null if the queue is emptyintsize()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
-