RFR: 8001647: In-place methods on Collection/List

Akhil Arora akhil.arora at oracle.com
Fri Dec 7 17:42:28 PST 2012


As part of the Library Lambdafication, this patch adds the following 
default methods to Collections -

Iterable.forEach(Block<T>)
Collection.removeAll(Predicate<T>)
List.sort(Comparator)
List.replaceAll(UnaryOperator<T>)

It also provides more efficient implementations of these methods for 
ArrayList, Vector and CopyOnWriteArrayList. Please review.

http://cr.openjdk.java.net/~akhil/8001647.1/webrev/

Thanks to the many people who have already contributed to this patch.


More information about the lambda-dev mailing list