Class IntPriorityQueues.SynchronizedPriorityQueue

java.lang.Object
it.unimi.dsi.fastutil.ints.IntPriorityQueues.SynchronizedPriorityQueue
All Implemented Interfaces:
IntPriorityQueue, it.unimi.dsi.fastutil.PriorityQueue<Integer>
Enclosing class:
IntPriorityQueues

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

  • Constructor Details

  • Method Details

    • enqueue

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

      public int dequeueInt()
      Description copied from interface: IntPriorityQueue
      Dequeues the first element from the queue.
      Specified by:
      dequeueInt in interface IntPriorityQueue
      Returns:
      the dequeued element.
      See Also:
    • firstInt

      public int firstInt()
      Description copied from interface: IntPriorityQueue
      Returns the first element of the queue.
      Specified by:
      firstInt in interface IntPriorityQueue
      Returns:
      the first element.
      See Also:
    • lastInt

      public int lastInt()
      Description copied from interface: IntPriorityQueue
      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:
      lastInt in interface IntPriorityQueue
      Returns:
      the last element.
      See Also:
    • isEmpty

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

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

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

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

      public it.unimi.dsi.fastutil.ints.IntComparator comparator()
      Description copied from interface: IntPriorityQueue
      Returns the comparator associated with this priority queue, or null if it uses its elements' natural ordering.
      Specified by:
      comparator in interface IntPriorityQueue
      Specified by:
      comparator in interface it.unimi.dsi.fastutil.PriorityQueue<Integer>
      Returns:
      the comparator associated with this priority queue.
      See Also:
      • PriorityQueue.comparator()
    • enqueue

      @Deprecated public void enqueue(Integer x)
      Deprecated.
      Description copied from interface: IntPriorityQueue

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

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

      @Deprecated public Integer dequeue()
      Deprecated.
      Description copied from interface: IntPriorityQueue

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

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

      @Deprecated public Integer first()
      Deprecated.
      Description copied from interface: IntPriorityQueue

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

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

      @Deprecated public Integer last()
      Deprecated.
      Description copied from interface: IntPriorityQueue

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

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

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

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