equal
deleted
inserted
replaced
267 |
267 |
268 // Have to override just to update the javadoc |
268 // Have to override just to update the javadoc |
269 |
269 |
270 /** |
270 /** |
271 * Inserts the specified element at the tail of this queue. |
271 * Inserts the specified element at the tail of this queue. |
|
272 * As the queue is unbounded, this method will never throw |
|
273 * {@link IllegalStateException} or return {@code false}. |
272 * |
274 * |
273 * @return {@code true} (as specified by {@link Collection#add}) |
275 * @return {@code true} (as specified by {@link Collection#add}) |
274 * @throws NullPointerException if the specified element is null |
276 * @throws NullPointerException if the specified element is null |
275 */ |
277 */ |
276 public boolean add(E e) { |
278 public boolean add(E e) { |
296 return (p == next) ? head : next; |
298 return (p == next) ? head : next; |
297 } |
299 } |
298 |
300 |
299 /** |
301 /** |
300 * Inserts the specified element at the tail of this queue. |
302 * Inserts the specified element at the tail of this queue. |
|
303 * As the queue is unbounded, this method will never return {@code false}. |
301 * |
304 * |
302 * @return {@code true} (as specified by {@link Queue#offer}) |
305 * @return {@code true} (as specified by {@link Queue#offer}) |
303 * @throws NullPointerException if the specified element is null |
306 * @throws NullPointerException if the specified element is null |
304 */ |
307 */ |
305 public boolean offer(E e) { |
308 public boolean offer(E e) { |