Class CharPriorityQueues.SynchronizedPriorityQueue

java.lang.Object
it.unimi.dsi.fastutil.chars.CharPriorityQueues.SynchronizedPriorityQueue
All Implemented Interfaces:
CharPriorityQueue, it.unimi.dsi.fastutil.PriorityQueue<java.lang.Character>
Enclosing class:
CharPriorityQueues

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

    Modifier and Type Method Description
    void changed()  
    void clear()  
    CharComparator comparator()
    Returns the comparator associated with this priority queue, or null if it uses its elements' natural ordering.
    java.lang.Character dequeue()
    Deprecated.
    char dequeueChar()
    Dequeues the first element from the queue.
    void enqueue​(char x)
    Enqueues a new element.
    void enqueue​(java.lang.Character x)
    Deprecated.
    boolean equals​(java.lang.Object o)  
    java.lang.Character first()
    Deprecated.
    char firstChar()
    Returns the first element of the queue.
    int hashCode()  
    boolean isEmpty()  
    java.lang.Character last()
    Deprecated.
    char lastChar()
    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​(char x)
      Description copied from interface: CharPriorityQueue
      Enqueues a new element.
      Specified by:
      enqueue in interface CharPriorityQueue
      Parameters:
      x - the element to enqueue.
      See Also:
      PriorityQueue.enqueue(Object)
    • dequeueChar

      public char dequeueChar()
      Description copied from interface: CharPriorityQueue
      Dequeues the first element from the queue.
      Specified by:
      dequeueChar in interface CharPriorityQueue
      Returns:
      the dequeued element.
      See Also:
      CharPriorityQueue.dequeue()
    • firstChar

      public char firstChar()
      Description copied from interface: CharPriorityQueue
      Returns the first element of the queue.
      Specified by:
      firstChar in interface CharPriorityQueue
      Returns:
      the first element.
      See Also:
      CharPriorityQueue.first()
    • lastChar

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

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

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

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

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

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

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

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

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

      @Deprecated public java.lang.Character dequeue()
      Deprecated.
      Description copied from interface: CharPriorityQueue

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

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

      @Deprecated public java.lang.Character first()
      Deprecated.
      Description copied from interface: CharPriorityQueue

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

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

      @Deprecated public java.lang.Character last()
      Deprecated.
      Description copied from interface: CharPriorityQueue

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

      Specified by:
      last in interface CharPriorityQueue
      Specified by:
      last in interface it.unimi.dsi.fastutil.PriorityQueue<java.lang.Character>
    • 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