Retrieves and removes the head of this queue. This method differs from {@link #poll poll} only in that it throws an exception if this queue is empty.
<p>This implementation returns the result of {@code poll} unless the queue is empty.
@return the head of this queue @throws NoSuchElementException if this queue is empty
See Implementation
Retrieves and removes the head of this queue. This method differs from {@link #poll poll} only in that it throws an exception if this queue is empty.
<p>This implementation returns the result of {@code poll} unless the queue is empty.
@return the head of this queue @throws NoSuchElementException if this queue is empty