219 |
|
|
220 |
|
/** |
221 |
|
* Retrieves, but does not remove, the head of this queue, |
222 |
< |
* returning <tt>null</tt> if this queue has no elements with an |
223 |
< |
* expired delay. |
222 |
> |
* or returns <tt>null</tt> if this queue is empty. |
223 |
> |
* Unlike <tt>poll</tt>, this method can be used to inspect |
224 |
> |
* elements that have not yet expired. |
225 |
|
* |
226 |
|
* @return the head of this queue, or <tt>null</tt> if this |
227 |
< |
* queue has no elements with an expired delay |
227 |
> |
* queue is empty. |
228 |
|
*/ |
229 |
|
public E peek() { |
230 |
|
final ReentrantLock lock = this.lock; |