Class RAPriQueue<T>

java.lang.Object
io.deephaven.base.RAPriQueue<T>

public class RAPriQueue<T> extends Object
A "random-access" priority queue.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
    the queue adapter
  • Constructor Summary

    Constructors
    Constructor
    Description
    RAPriQueue(int initialSize, RAPriQueue.Adapter<? super T> adapter, Class<? super T> elementClass)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    clear out the queue
    int
    dump(T[] result, int startIndex)
     
    <T2> int
    dump(T2[] result, int startIndex, Function<T,T2> f)
     
    void
    enter(T el)
    Adds an element to the queue, or moves to appropriate place if already there
    get(int index)
     
    boolean
    Returns true if the priority queue contains no elements.
    void
    remove(T el)
    remove an arbitrary element from the queue
    Remove the top element from the queue, or null if the queue is empty
    int
    return the priority queue's size
    top()
    Return the top of the queue

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • 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

      public void enter(T el)
      Adds an element to the queue, or moves to appropriate place if already there
    • top

      public T top()
      Return the top of the queue
    • removeTop

      public T removeTop()
      Remove the top element from the queue, or null if the queue is empty
    • remove

      public void remove(T el)
      remove an arbitrary element from the queue
    • dump

      public int dump(T[] result, int startIndex)
    • get

      public T get(int index)
    • dump

      public <T2> int dump(T2[] result, int startIndex, Function<T,T2> f)