# | Line 25 | Line 25 | public abstract class AbstractQueue<E> e | |
---|---|---|
25 | throw new IllegalStateException("Queue full"); | |
26 | } | |
27 | ||
28 | < | public E remove() throws NoSuchElementException { |
28 | > | public E remove() { |
29 | E x = poll(); | |
30 | if (x != null) | |
31 | return x; | |
# | Line 33 | Line 33 | public abstract class AbstractQueue<E> e | |
33 | throw new NoSuchElementException(); | |
34 | } | |
35 | ||
36 | < | public E element() throws NoSuchElementException { |
36 | > | public E element() { |
37 | E x = peek(); | |
38 | if (x != null) | |
39 | return x; |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |