Interface DoublePriorityQueue

    • Method Detail

      • dequeueDouble

        double dequeueDouble()
        Dequeues the first element from the queue.
        Returns:
        the dequeued element.
        Throws:
        NoSuchElementException - if the queue is empty.
        See Also:
        dequeue()
      • firstDouble

        double firstDouble()
        Returns the first element of the queue.
        Returns:
        the first element.
        Throws:
        NoSuchElementException - if the queue is empty.
        See Also:
        first()
      • lastDouble

        default double lastDouble()
        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:
        NoSuchElementException - if the queue is empty.
        See Also:
        last()
      • enqueue

        @Deprecated
        default void enqueue​(Double 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<Double>
        Parameters:
        x - the element to enqueue.
      • dequeue

        @Deprecated
        default Double 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<Double>
        Returns:
        the dequeued element.
      • first

        @Deprecated
        default Double 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<Double>
        Returns:
        the first element.
      • last

        @Deprecated
        default Double 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<Double>
        Returns:
        the last element.