RFR: 8023339 : (xs) Rename Collection.removeIf(Predicate) to removeAll(Predicate)
Brian Goetz
brian.goetz at oracle.com
Tue Sep 10 18:55:23 UTC 2013
>> http://cr.openjdk.java.net/~mduigou/JDK-8024291/0/webrev/
>>
>
> I'm still mildly opposed.
> The main uncompellingness
> is that removeIf is a more descriptive name than removeAll.
The method currently called removeIf is like an atom with one valence
electron, searching for a pattern to bond with; right now it is floating
free. It currently has found a bond with the removeAll atom, but if the
methods like Map.replaceAllIf(Predicate, BiFunction) existed as
originally planned (they basically fell off the side of the card), it
would form a stronger bond with the other xxxIf methods.
Which argues to leave it is as is, since I suspect eventually we'll
discover that the existing Map.replaceAll is pretty weak.
More information about the core-libs-dev
mailing list