8 |
|
import java.util.Spliterator; |
9 |
|
import java.util.stream.Stream; |
10 |
|
import java.util.stream.Streams; |
11 |
< |
import java.util.function.Block; |
11 |
> |
import java.util.function.Consumer; |
12 |
|
|
13 |
|
/** |
14 |
|
* Resizable-array implementation of the {@link Deque} interface. Array |
697 |
|
* Returns {@code true} if this deque contained the specified element |
698 |
|
* (or equivalently, if this deque changed as a result of the call). |
699 |
|
* |
700 |
< |
* <p>This method is equivalent to {@link #removeFirstOccurrence}. |
700 |
> |
* <p>This method is equivalent to {@link #removeFirstOccurrence(Object)}. |
701 |
|
* |
702 |
|
* @param o element to be removed from this deque, if present |
703 |
|
* @return {@code true} if this deque contained the specified element |
881 |
|
return null; |
882 |
|
} |
883 |
|
|
884 |
< |
public void forEach(Block<? super E> block) { |
884 |
> |
public void forEach(Consumer<? super E> block) { |
885 |
|
if (block == null) |
886 |
|
throw new NullPointerException(); |
887 |
|
Object[] a = deq.elements; |
896 |
|
} |
897 |
|
} |
898 |
|
|
899 |
< |
public boolean tryAdvance(Block<? super E> block) { |
899 |
> |
public boolean tryAdvance(Consumer<? super E> block) { |
900 |
|
if (block == null) |
901 |
|
throw new NullPointerException(); |
902 |
|
Object[] a = deq.elements; |