Retrieves, but does not remove, the head of this queue. This method
differs from {@link #peek peek} only in that it throws an exception if
this queue is empty.
<p>This implementation returns the result of {@code peek}
unless the queue is empty.
@return the head of this queue
@throws NoSuchElementException if this queue is empty
Retrieves, but does not remove, the head of this queue. This method differs from {@link #peek peek} only in that it throws an exception if this queue is empty.
<p>This implementation returns the result of {@code peek} unless the queue is empty.
@return the head of this queue @throws NoSuchElementException if this queue is empty