53 |
|
* else throws an <tt>IllegalStateException</tt>. |
54 |
|
* |
55 |
|
* @param e the element to add |
56 |
< |
* @return <tt>true</tt> (as per the spec for {@link Collection#add}) |
56 |
> |
* @return <tt>true</tt> (as specified by {@link Collection#add}) |
57 |
|
* @throws IllegalStateException if the element cannot be added at this |
58 |
|
* time due to capacity restrictions |
59 |
|
* @throws ClassCastException if the class of the specified element |
72 |
|
|
73 |
|
/** |
74 |
|
* Retrieves and removes the head of this queue. This method differs |
75 |
< |
* from {@link #poll} only in that it throws an exception if this queue |
76 |
< |
* is empty. |
75 |
> |
* from {@link #poll poll} only in that it throws an exception if this |
76 |
> |
* queue is empty. |
77 |
|
* |
78 |
|
* <p>This implementation returns the result of <tt>poll</tt> |
79 |
|
* unless the queue is empty. |
91 |
|
|
92 |
|
/** |
93 |
|
* Retrieves, but does not remove, the head of this queue. This method |
94 |
< |
* differs from {@link #peek} only in that it throws an exception if |
94 |
> |
* differs from {@link #peek peek} only in that it throws an exception if |
95 |
|
* this queue is empty. |
96 |
|
* |
97 |
|
* <p>This implementation returns the result of <tt>peek</tt> |