AbstractDeque.poll

Unlinks the first element in the queue, waiting up to the specified time to do so if the queue is empty.

<p>This method is equivalent to {@link #pollFirst(long, TimeUnit)}.

@param timeout length of time to wait @param unit units that timeout is expressed in

@return the unlinked element @throws InterruptedException if the current thread is interrupted

  1. E poll()
  2. E poll(Duration timeout)
    class AbstractDeque(E)
    E
    poll
    (
    Duration timeout
    )

Meta