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

Peter Levart peter.levart at gmail.com
Sat Dec 8 13:27:10 UTC 2012

On 12/08/2012 02:42 AM, Akhil Arora wrote:
> 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.


There's finally a way to sort ArrayList's array in-place. Until now you 
either had to resort to using arrays or a sub-optimal 
Collections.sort(List) method.

Regards, Peter

More information about the core-libs-dev mailing list