Interface LongPriorityQueue

All Superinterfaces:
it.unimi.dsi.fastutil.PriorityQueue<Long>
All Known Implementing Classes:
LongArrayFIFOQueue, LongArrayPriorityQueue, LongHeapPriorityQueue, LongPriorityQueues.SynchronizedPriorityQueue

public interface LongPriorityQueue extends it.unimi.dsi.fastutil.PriorityQueue<Long>
A type-specific PriorityQueue; provides some additional methods that use polymorphism to avoid (un)boxing.

Additionally, this interface strengthens comparator().

  • Method Summary

    Modifier and Type
    Method
    Description
    it.unimi.dsi.fastutil.longs.LongComparator
    Returns the comparator associated with this priority queue, or null if it uses its elements' natural ordering.
    default Long
    Deprecated.
    Please use the corresponding type-specific method instead.
    long
    Dequeues the first element from the queue.
    void
    enqueue(long x)
    Enqueues a new element.
    default void
    Deprecated.
    Please use the corresponding type-specific method instead.
    default Long
    Deprecated.
    Please use the corresponding type-specific method instead.
    long
    Returns the first element of the queue.
    default Long
    Deprecated.
    Please use the corresponding type-specific method instead.
    default long
    Returns the last element of the queue, that is, the element the would be dequeued last (optional operation).

    Methods inherited from interface it.unimi.dsi.fastutil.PriorityQueue

    changed, clear, isEmpty, size
  • Method Details

    • enqueue

      void enqueue(long x)
      Enqueues a new element.
      Parameters:
      x - the element to enqueue.
      See Also:
      • PriorityQueue.enqueue(Object)
    • dequeueLong

      long dequeueLong()
      Dequeues the first element from the queue.
      Returns:
      the dequeued element.
      Throws:
      NoSuchElementException - if the queue is empty.
      See Also:
    • firstLong

      long firstLong()
      Returns the first element of the queue.
      Returns:
      the first element.
      Throws:
      NoSuchElementException - if the queue is empty.
      See Also:
    • lastLong

      default long lastLong()
      Returns the last element of the queue, that is, the element the would be dequeued last (optional operation).

      This default implementation just throws an UnsupportedOperationException.

      Returns:
      the last element.
      Throws:
      NoSuchElementException - if the queue is empty.
      See Also:
    • comparator

      it.unimi.dsi.fastutil.longs.LongComparator comparator()
      Returns the comparator associated with this priority queue, or null if it uses its elements' natural ordering.
      Specified by:
      comparator in interface it.unimi.dsi.fastutil.PriorityQueue<Long>
      Returns:
      the comparator associated with this priority queue.
      See Also:
      • PriorityQueue.comparator()
    • enqueue

      @Deprecated default void enqueue(Long x)
      Deprecated.
      Please use the corresponding type-specific method instead.

      This default implementation delegates to the corresponding type-specific method.

      Specified by:
      enqueue in interface it.unimi.dsi.fastutil.PriorityQueue<Long>
    • dequeue

      @Deprecated default Long dequeue()
      Deprecated.
      Please use the corresponding type-specific method instead.

      This default implementation delegates to the corresponding type-specific method.

      Specified by:
      dequeue in interface it.unimi.dsi.fastutil.PriorityQueue<Long>
    • first

      @Deprecated default Long first()
      Deprecated.
      Please use the corresponding type-specific method instead.

      This default implementation delegates to the corresponding type-specific method.

      Specified by:
      first in interface it.unimi.dsi.fastutil.PriorityQueue<Long>
    • last

      @Deprecated default Long last()
      Deprecated.
      Please use the corresponding type-specific method instead.

      This default implementation delegates to the corresponding type-specific method.

      Specified by:
      last in interface it.unimi.dsi.fastutil.PriorityQueue<Long>