176 |
|
* available. When using a capacity-restricted deque, it is generally |
177 |
|
* preferable to use {@link #offerFirst(Object) offerFirst}. |
178 |
|
* |
179 |
+ |
* @param e the element to add |
180 |
|
* @throws IllegalStateException {@inheritDoc} |
181 |
|
* @throws ClassCastException {@inheritDoc} |
182 |
|
* @throws NullPointerException if the specified element is null |
191 |
|
* available. When using a capacity-restricted deque, it is generally |
192 |
|
* preferable to use {@link #offerLast(Object) offerLast}. |
193 |
|
* |
194 |
+ |
* @param e the element to add |
195 |
|
* @throws IllegalStateException {@inheritDoc} |
196 |
|
* @throws ClassCastException {@inheritDoc} |
197 |
|
* @throws NullPointerException if the specified element is null |
201 |
|
|
202 |
|
/** |
203 |
|
* Inserts the specified element at the front of this deque if it is |
204 |
< |
* possible to do so immediately without violating capacity restrictions. |
204 |
> |
* possible to do so immediately without violating capacity restrictions, |
205 |
> |
* returning <tt>true</tt> upon success and <tt>false</tt> if no space is |
206 |
> |
* currently available. |
207 |
|
* When using a capacity-restricted deque, this method is generally |
208 |
|
* preferable to the {@link #addFirst(Object) addFirst} method, which can |
209 |
|
* fail to insert an element only by throwing an exception. |
210 |
|
* |
211 |
+ |
* @param e the element to add |
212 |
|
* @throws ClassCastException {@inheritDoc} |
213 |
|
* @throws NullPointerException if the specified element is null |
214 |
|
* @throws IllegalArgumentException {@inheritDoc} |
217 |
|
|
218 |
|
/** |
219 |
|
* Inserts the specified element at the end of this deque if it is |
220 |
< |
* possible to do so immediately without violating capacity restrictions. |
220 |
> |
* possible to do so immediately without violating capacity restrictions, |
221 |
> |
* returning <tt>true</tt> upon success and <tt>false</tt> if no space is |
222 |
> |
* currently available. |
223 |
|
* When using a capacity-restricted deque, this method is generally |
224 |
|
* preferable to the {@link #addLast(Object) addLast} method, which can |
225 |
|
* fail to insert an element only by throwing an exception. |
226 |
|
* |
227 |
+ |
* @param e the element to add |
228 |
|
* @throws ClassCastException {@inheritDoc} |
229 |
|
* @throws NullPointerException if the specified element is null |
230 |
|
* @throws IllegalArgumentException {@inheritDoc} |
232 |
|
boolean offerLast(E e); |
233 |
|
|
234 |
|
/** |
235 |
< |
* Inserts the specified element as the first element of this deque, |
235 |
> |
* Inserts the specified element at the front of this deque, |
236 |
|
* waiting if necessary for space to become available. |
237 |
|
* |
238 |
|
* @param e the element to add |
246 |
|
void putFirst(E e) throws InterruptedException; |
247 |
|
|
248 |
|
/** |
249 |
< |
* Inserts the specified element as the last element of this deque, |
249 |
> |
* Inserts the specified element at the end of this deque, |
250 |
|
* waiting if necessary for space to become available. |
251 |
|
* |
252 |
|
* @param e the element to add |
260 |
|
void putLast(E e) throws InterruptedException; |
261 |
|
|
262 |
|
/** |
263 |
< |
* Inserts the specified element as the first element of this deque, |
263 |
> |
* Inserts the specified element at the front of this deque, |
264 |
|
* waiting up to the specified wait time if necessary for space to |
265 |
|
* become available. |
266 |
|
* |
282 |
|
throws InterruptedException; |
283 |
|
|
284 |
|
/** |
285 |
< |
* Inserts the specified element as the last element of this deque, |
285 |
> |
* Inserts the specified element at the end of this deque, |
286 |
|
* waiting up to the specified wait time if necessary for space to |
287 |
|
* become available. |
288 |
|
* |
358 |
|
* If the deque does not contain the element, it is unchanged. |
359 |
|
* More formally, removes the first element <tt>e</tt> such that |
360 |
|
* <tt>o.equals(e)</tt> (if such an element exists). |
361 |
< |
* Returns true if this deque contained the specified element (or |
362 |
< |
* equivalently, if this deque changed as a result of the call). |
361 |
> |
* Returns <tt>true</tt> if this deque contained the specified element |
362 |
> |
* (or equivalently, if this deque changed as a result of the call). |
363 |
|
* |
364 |
|
* @param o element to be removed from this deque, if present |
365 |
|
* @return <tt>true</tt> if an element was removed as a result of this call |
374 |
|
* If the deque does not contain the element, it is unchanged. |
375 |
|
* More formally, removes the last element <tt>e</tt> such that |
376 |
|
* <tt>o.equals(e)</tt> (if such an element exists). |
377 |
< |
* Returns true if this deque contained the specified element (or |
378 |
< |
* equivalently, if this deque changed as a result of the call). |
377 |
> |
* Returns <tt>true</tt> if this deque contained the specified element |
378 |
> |
* (or equivalently, if this deque changed as a result of the call). |
379 |
|
* |
380 |
|
* @param o element to be removed from this deque, if present |
381 |
|
* @return <tt>true</tt> if an element was removed as a result of this call |
546 |
|
* If the deque does not contain the element, it is unchanged. |
547 |
|
* More formally, removes the first element <tt>e</tt> such that |
548 |
|
* <tt>o.equals(e)</tt> (if such an element exists). |
549 |
< |
* Returns true if this deque contained the specified element (or |
550 |
< |
* equivalently, if this deque changed as a result of the call). |
549 |
> |
* Returns <tt>true</tt> if this deque contained the specified element |
550 |
> |
* (or equivalently, if this deque changed as a result of the call). |
551 |
|
* |
552 |
|
* <p>This method is equivalent to |
553 |
|
* {@link #removeFirstOccurrence(Object) removeFirstOccurrence}. |