Class LongPriorityQueues.SynchronizedPriorityQueue

java.lang.Object
it.unimi.dsi.fastutil.longs.LongPriorityQueues.SynchronizedPriorityQueue
All Implemented Interfaces:
LongPriorityQueue, it.unimi.dsi.fastutil.PriorityQueue<Long>
Enclosing class:
LongPriorityQueues

public static class LongPriorityQueues.SynchronizedPriorityQueue extends Object implements LongPriorityQueue
A synchronized wrapper class for priority queues.
  • Field Details

  • Constructor Details

  • Method Details

    • enqueue

      public void enqueue(long x)
      Description copied from interface: LongPriorityQueue
      Enqueues a new element.
      Specified by:
      enqueue in interface LongPriorityQueue
      Parameters:
      x - the element to enqueue.
      See Also:
      • PriorityQueue.enqueue(Object)
    • dequeueLong

      public long dequeueLong()
      Description copied from interface: LongPriorityQueue
      Dequeues the first element from the queue.
      Specified by:
      dequeueLong in interface LongPriorityQueue
      Returns:
      the dequeued element.
      See Also:
    • firstLong

      public long firstLong()
      Description copied from interface: LongPriorityQueue
      Returns the first element of the queue.
      Specified by:
      firstLong in interface LongPriorityQueue
      Returns:
      the first element.
      See Also:
    • lastLong

      public long lastLong()
      Description copied from interface: LongPriorityQueue
      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.

      Specified by:
      lastLong in interface LongPriorityQueue
      Returns:
      the last element.
      See Also:
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface it.unimi.dsi.fastutil.PriorityQueue<Long>
    • size

      public int size()
      Specified by:
      size in interface it.unimi.dsi.fastutil.PriorityQueue<Long>
    • clear

      public void clear()
      Specified by:
      clear in interface it.unimi.dsi.fastutil.PriorityQueue<Long>
    • changed

      public void changed()
      Specified by:
      changed in interface it.unimi.dsi.fastutil.PriorityQueue<Long>
    • comparator

      public it.unimi.dsi.fastutil.longs.LongComparator comparator()
      Description copied from interface: LongPriorityQueue
      Returns the comparator associated with this priority queue, or null if it uses its elements' natural ordering.
      Specified by:
      comparator in interface LongPriorityQueue
      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 public void enqueue(Long x)
      Deprecated.
      Description copied from interface: LongPriorityQueue

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

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

      @Deprecated public Long dequeue()
      Deprecated.
      Description copied from interface: LongPriorityQueue

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

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

      @Deprecated public Long first()
      Deprecated.
      Description copied from interface: LongPriorityQueue

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

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

      @Deprecated public Long last()
      Deprecated.
      Description copied from interface: LongPriorityQueue

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

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object