1417 |
|
} |
1418 |
|
|
1419 |
|
public void forEachRemaining(Consumer<? super E> action) { |
1420 |
+ |
Objects.requireNonNull(action); |
1421 |
|
Node<E> p; |
1421 |
– |
if (action == null) throw new NullPointerException(); |
1422 |
|
if (!exhausted && |
1423 |
|
((p = current) != null || (p = first()) != null)) { |
1424 |
|
current = null; |
1434 |
|
} |
1435 |
|
|
1436 |
|
public boolean tryAdvance(Consumer<? super E> action) { |
1437 |
+ |
Objects.requireNonNull(action); |
1438 |
|
Node<E> p; |
1438 |
– |
if (action == null) throw new NullPointerException(); |
1439 |
|
if (!exhausted && |
1440 |
|
((p = current) != null || (p = first()) != null)) { |
1441 |
|
E e; |