Class L1PriorityQueue<E extends IDIndexedAccessible>

    • Constructor Summary

      Constructors 
      Constructor Description
      L1PriorityQueue​(int maxCapacity, java.util.Comparator<E> comparator, E queryHolder)
      Init the queue with max capacity and specified comparator.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void clearAllElements()
      Clear all elements in this queue.
      protected boolean contains​(E element)
      Check whether an element with the same ID exists.
      protected E get​(E element)
      Return the element with the same id of the input, null if it doesn't exist.
      protected boolean isEmpty()
      Whether the queue is empty.
      protected E pollFirst()
      Get and remove the first element.
      protected void pushToQueue​(E element)
      Push the element into the queue.
      protected E remove​(E element)
      Remove and return the element by its ID.
      • Methods inherited from class java.lang.Object

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

      • L1PriorityQueue

        public L1PriorityQueue​(int maxCapacity,
                               java.util.Comparator<E> comparator,
                               E queryHolder)
        Init the queue with max capacity and specified comparator.
        Parameters:
        maxCapacity - the max capacity of the queue.
        comparator - the comparator for comparing the elements.
        queryHolder - the query holder instance.
        Throws:
        java.lang.IllegalArgumentException - if maxCapacity <= 0.
        See Also:
        IndexedBlockingQueue