Class FloatPriorityQueues.SynchronizedPriorityQueue

java.lang.Object
it.unimi.dsi.fastutil.floats.FloatPriorityQueues.SynchronizedPriorityQueue
All Implemented Interfaces:
FloatPriorityQueue, it.unimi.dsi.fastutil.PriorityQueue<java.lang.Float>
Enclosing class:
FloatPriorityQueues

public static class FloatPriorityQueues.SynchronizedPriorityQueue
extends java.lang.Object
implements FloatPriorityQueue
A synchronized wrapper class for priority queues.
  • Method Summary

    Modifier and Type Method Description
    void changed()  
    void clear()  
    FloatComparator comparator()
    Returns the comparator associated with this priority queue, or null if it uses its elements' natural ordering.
    java.lang.Float dequeue()
    Deprecated.
    float dequeueFloat()
    Dequeues the first element from the queue.
    void enqueue​(float x)
    Enqueues a new element.
    void enqueue​(java.lang.Float x)
    Deprecated.
    boolean equals​(java.lang.Object o)  
    java.lang.Float first()
    Deprecated.
    float firstFloat()
    Returns the first element of the queue.
    int hashCode()  
    boolean isEmpty()  
    java.lang.Float last()
    Deprecated.
    float lastFloat()
    Returns the last element of the queue, that is, the element the would be dequeued last (optional operation).
    int size()  

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • enqueue

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

      public float dequeueFloat()
      Description copied from interface: FloatPriorityQueue
      Dequeues the first element from the queue.
      Specified by:
      dequeueFloat in interface FloatPriorityQueue
      Returns:
      the dequeued element.
      See Also:
      FloatPriorityQueue.dequeue()
    • firstFloat

      public float firstFloat()
      Description copied from interface: FloatPriorityQueue
      Returns the first element of the queue.
      Specified by:
      firstFloat in interface FloatPriorityQueue
      Returns:
      the first element.
      See Also:
      FloatPriorityQueue.first()
    • lastFloat

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

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

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

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

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

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

      @Deprecated public void enqueue​(java.lang.Float x)
      Deprecated.
      Description copied from interface: FloatPriorityQueue

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

      Specified by:
      enqueue in interface FloatPriorityQueue
      Specified by:
      enqueue in interface it.unimi.dsi.fastutil.PriorityQueue<java.lang.Float>
    • dequeue

      @Deprecated public java.lang.Float dequeue()
      Deprecated.
      Description copied from interface: FloatPriorityQueue

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

      Specified by:
      dequeue in interface FloatPriorityQueue
      Specified by:
      dequeue in interface it.unimi.dsi.fastutil.PriorityQueue<java.lang.Float>
    • first

      @Deprecated public java.lang.Float first()
      Deprecated.
      Description copied from interface: FloatPriorityQueue

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

      Specified by:
      first in interface FloatPriorityQueue
      Specified by:
      first in interface it.unimi.dsi.fastutil.PriorityQueue<java.lang.Float>
    • last

      @Deprecated public java.lang.Float last()
      Deprecated.
      Description copied from interface: FloatPriorityQueue

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

      Specified by:
      last in interface FloatPriorityQueue
      Specified by:
      last in interface it.unimi.dsi.fastutil.PriorityQueue<java.lang.Float>
    • hashCode

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

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object