Class BytePriorityQueues.SynchronizedPriorityQueue

java.lang.Object
it.unimi.dsi.fastutil.bytes.BytePriorityQueues.SynchronizedPriorityQueue
All Implemented Interfaces:
BytePriorityQueue, it.unimi.dsi.fastutil.PriorityQueue<Byte>
Enclosing class:
BytePriorityQueues

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

  • Constructor Details

  • Method Details

    • enqueue

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

      public byte dequeueByte()
      Description copied from interface: BytePriorityQueue
      Dequeues the first element from the queue.
      Specified by:
      dequeueByte in interface BytePriorityQueue
      Returns:
      the dequeued element.
      See Also:
    • firstByte

      public byte firstByte()
      Description copied from interface: BytePriorityQueue
      Returns the first element of the queue.
      Specified by:
      firstByte in interface BytePriorityQueue
      Returns:
      the first element.
      See Also:
    • lastByte

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

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

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

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

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

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

      @Deprecated public void enqueue(Byte x)
      Deprecated.
      Description copied from interface: BytePriorityQueue

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

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

      @Deprecated public Byte dequeue()
      Deprecated.
      Description copied from interface: BytePriorityQueue

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

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

      @Deprecated public Byte first()
      Deprecated.
      Description copied from interface: BytePriorityQueue

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

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

      @Deprecated public Byte last()
      Deprecated.
      Description copied from interface: BytePriorityQueue

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

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

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

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