Design for collections upgrades

Stephen Colebourne scolebourne at
Sun Mar 13 16:27:20 PDT 2011

On 13 March 2011 17:20, Brian Goetz <brian.goetz at> wrote:
>> I suggest that in-place operations, if included, should be named something like
>> void Collection.retainAll(Predicate<E>  predicate);
>> void Collection.removeAll(Predicate<E>  predicate);
> Which, conveniently, coincides exactly with our intent.  Map and reduce
> do not make sense as in-place operations, so really the whole in-place
> thing is about filtering, for which we already have sensible names
> (retainAll/removeAll) that are just crying out for lambda versions.

Great! retainAll/removeAll with lambdas FTW!

On the rest, I've not made a conclusion yet as to the usability of the API.


More information about the lambda-dev mailing list