8 |
|
import java.io.Serializable; |
9 |
|
import java.util.function.Consumer; |
10 |
|
import java.util.function.Predicate; |
11 |
< |
import java.util.function.UnaryOperator; |
12 |
< |
import jdk.internal.misc.SharedSecrets; |
11 |
> |
// OPENJDK import jdk.internal.access.SharedSecrets; |
12 |
|
|
13 |
|
/** |
14 |
|
* Resizable-array implementation of the {@link Deque} interface. Array |
50 |
|
* Iterator} interfaces. |
51 |
|
* |
52 |
|
* <p>This class is a member of the |
53 |
< |
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework"> |
53 |
> |
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework"> |
54 |
|
* Java Collections Framework</a>. |
55 |
|
* |
56 |
|
* @author Josh Bloch and Doug Lea |
916 |
|
* @param operator the operator to apply to each element |
917 |
|
* @since TBD |
918 |
|
*/ |
919 |
< |
/* public */ void replaceAll(UnaryOperator<E> operator) { |
919 |
> |
/* public */ void replaceAll(java.util.function.UnaryOperator<E> operator) { |
920 |
|
Objects.requireNonNull(operator); |
921 |
|
final Object[] es = elements; |
922 |
|
for (int i = head, end = tail, to = (i <= end) ? end : es.length; |
1198 |
|
} |
1199 |
|
} |
1200 |
|
|
1201 |
+ |
// OPENJDK @java.io.Serial |
1202 |
|
private static final long serialVersionUID = 2340985798034038923L; |
1203 |
|
|
1204 |
|
/** |
1210 |
|
* followed by all of its elements (each an object reference) in |
1211 |
|
* first-to-last order. |
1212 |
|
*/ |
1213 |
+ |
// OPENJDK @java.io.Serial |
1214 |
|
private void writeObject(java.io.ObjectOutputStream s) |
1215 |
|
throws java.io.IOException { |
1216 |
|
s.defaultWriteObject(); |
1235 |
|
* could not be found |
1236 |
|
* @throws java.io.IOException if an I/O error occurs |
1237 |
|
*/ |
1238 |
+ |
// OPENJDK @java.io.Serial |
1239 |
|
private void readObject(java.io.ObjectInputStream s) |
1240 |
|
throws java.io.IOException, ClassNotFoundException { |
1241 |
|
s.defaultReadObject(); |
1242 |
|
|
1243 |
|
// Read in size and allocate array |
1244 |
|
int size = s.readInt(); |
1245 |
< |
SharedSecrets.getJavaObjectInputStreamAccess().checkArray(s, Object[].class, size + 1); |
1245 |
> |
jsr166.Platform.checkArray(s, Object[].class, size + 1); |
1246 |
|
elements = new Object[size + 1]; |
1247 |
|
this.tail = size; |
1248 |
|
|