288 |
|
} |
289 |
|
} |
290 |
|
|
291 |
< |
public E firstElement() { |
291 |
> |
public E getFirst() { |
292 |
|
E x = peekFirst(); |
293 |
|
if (x == null) throw new NoSuchElementException(); |
294 |
|
return x; |
295 |
|
} |
296 |
|
|
297 |
< |
public E lastElement() { |
297 |
> |
public E getLast() { |
298 |
|
E x = peekLast(); |
299 |
|
if (x == null) throw new NoSuchElementException(); |
300 |
|
return x; |
429 |
|
public E remove() { return removeFirst(); } |
430 |
|
public E pop() { return removeFirst(); } |
431 |
|
public E peek() { return peekFirst(); } |
432 |
< |
public E element() { return firstElement(); } |
432 |
> |
public E element() { return getFirst(); } |
433 |
|
public boolean remove(Object o) { return removeFirstOccurrence(o); } |
434 |
|
|
435 |
|
// BlockingQueue methods |