7 |
|
import java.io.Serializable; |
8 |
|
import java.util.function.Consumer; |
9 |
|
import java.util.stream.Stream; |
10 |
– |
import java.util.stream.Streams; |
10 |
|
|
11 |
|
/** |
12 |
|
* Resizable-array implementation of the {@link Deque} interface. Array |
810 |
|
/** |
811 |
|
* Saves this deque to a stream (that is, serializes it). |
812 |
|
* |
813 |
+ |
* @param s the stream |
814 |
|
* @serialData The current size ({@code int}) of the deque, |
815 |
|
* followed by all of its elements (each an object reference) in |
816 |
|
* first-to-last order. |
830 |
|
|
831 |
|
/** |
832 |
|
* Reconstitutes this deque from a stream (that is, deserializes it). |
833 |
+ |
* @param s the stream |
834 |
|
*/ |
835 |
|
private void readObject(java.io.ObjectInputStream s) |
836 |
|
throws java.io.IOException, ClassNotFoundException { |
883 |
|
return null; |
884 |
|
} |
885 |
|
|
886 |
< |
public void forEach(Consumer<? super E> consumer) { |
886 |
> |
public void forEachRemaining(Consumer<? super E> consumer) { |
887 |
|
if (consumer == null) |
888 |
|
throw new NullPointerException(); |
889 |
|
Object[] a = deq.elements; |