Interface ShortPriorityQueue

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods 
      Modifier and Type Method Description
      ShortComparator comparator()
      Returns the comparator associated with this priority queue, or null if it uses its elements' natural ordering.
      default java.lang.Short dequeue()
      Deprecated.
      Please use the corresponding type-specific method instead.
      short dequeueShort()
      Dequeues the first element from the queue.
      void enqueue​(short x)
      Enqueues a new element.
      default void enqueue​(java.lang.Short x)
      Deprecated.
      Please use the corresponding type-specific method instead.
      default java.lang.Short first()
      Deprecated.
      Please use the corresponding type-specific method instead.
      short firstShort()
      Returns the first element of the queue.
      default java.lang.Short last()
      Deprecated.
      Please use the corresponding type-specific method instead.
      default short lastShort()
      Returns the last element of the queue, that is, the element the would be dequeued last (optional operation).
    • Method Detail

      • dequeueShort

        short dequeueShort()
        Dequeues the first element from the queue.
        Returns:
        the dequeued element.
        Throws:
        java.util.NoSuchElementException - if the queue is empty.
        See Also:
        dequeue()
      • firstShort

        short firstShort()
        Returns the first element of the queue.
        Returns:
        the first element.
        Throws:
        java.util.NoSuchElementException - if the queue is empty.
        See Also:
        first()
      • lastShort

        default short lastShort()
        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.

        Returns:
        the last element.
        Throws:
        java.util.NoSuchElementException - if the queue is empty.
        See Also:
        last()
      • enqueue

        @Deprecated
        default void enqueue​(java.lang.Short x)
        Deprecated.
        Please use the corresponding type-specific method instead.
        Enqueues a new element.

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

        Specified by:
        enqueue in interface PriorityQueue<java.lang.Short>
        Parameters:
        x - the element to enqueue.
      • dequeue

        @Deprecated
        default java.lang.Short dequeue()
        Deprecated.
        Please use the corresponding type-specific method instead.
        Dequeues the first element from the queue.

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

        Specified by:
        dequeue in interface PriorityQueue<java.lang.Short>
        Returns:
        the dequeued element.
      • first

        @Deprecated
        default java.lang.Short first()
        Deprecated.
        Please use the corresponding type-specific method instead.
        Returns the first element of the queue.

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

        Specified by:
        first in interface PriorityQueue<java.lang.Short>
        Returns:
        the first element.
      • last

        @Deprecated
        default java.lang.Short last()
        Deprecated.
        Please use the corresponding type-specific method instead.
        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.

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

        Specified by:
        last in interface PriorityQueue<java.lang.Short>
        Returns:
        the last element.