--- old/src/share/classes/java/util/Collections.java 2012-12-10 21:19:07.727766109 -0800 +++ new/src/share/classes/java/util/Collections.java 2012-12-10 21:19:07.555766102 -0800 @@ -28,6 +28,9 @@ import java.io.ObjectOutputStream; import java.io.IOException; import java.lang.reflect.Array; +import java.util.function.Block; +import java.util.function.Predicate; +import java.util.function.UnaryOperator; /** * This class consists exclusively of static methods that operate on or return @@ -1107,6 +1110,9 @@ public void clear() { throw new UnsupportedOperationException(); } + public boolean removeAll(Predicate filter) { + throw new UnsupportedOperationException(); + } } /** @@ -1237,6 +1243,12 @@ public boolean addAll(int index, Collection c) { throw new UnsupportedOperationException(); } + public void replaceAll(UnaryOperator operator) { + throw new UnsupportedOperationException(); + } + public void sort(Comparator c) { + throw new UnsupportedOperationException(); + } public ListIterator listIterator() {return listIterator(0);} public ListIterator listIterator(final int index) { @@ -1678,6 +1690,12 @@ private void writeObject(ObjectOutputStream s) throws IOException { synchronized (mutex) {s.defaultWriteObject();} } + public void forEach(Block block) { + synchronized (mutex) {c.forEach(block);} + } + public boolean removeAll(Predicate filter) { + synchronized (mutex) {return c.removeAll(filter);} + } } /** @@ -1916,6 +1934,12 @@ public boolean addAll(int index, Collection c) { synchronized (mutex) {return list.addAll(index, c);} } + public void replaceAll(UnaryOperator operator) { + synchronized (mutex) {list.replaceAll(operator);} + } + public void sort(Comparator c) { + synchronized (mutex) {list.sort(c);} + } public ListIterator listIterator() { return list.listIterator(); // Must be manually synched by user