hg: lambda/lambda/jdk: initial small set of extension methods on Collection and List which provide functional-style variants of common operations.

Mike Duigou mike.duigou at oracle.com
Thu Aug 18 15:47:24 PDT 2011


On Aug 18 2011, at 07:39 , Rémi Forax wrote:

> On 08/18/2011 04:23 PM, Paul Benedict wrote:
>> Hi Mike,
>> 
>> I don't think the xxxHelper classes are a good name. The utility
>> package is in itself a bunch of helper classes. And a name like
>> ListHelper kind of begs the question what help is needed or why help
>> is needed. Since these are all static methods, why not merge
>> CollectionHelpers with Collections, and introduce a new static utility
>> Lists?
>> 
>> Paul

None of the class or method names should be considered permanent. There's still lots of time to rename and reorganize things.


> Hi Paul, the real name of these classes is garbage class.
> But ListGarbage is not that cool :)
> 
> As Mike says, it's just the first cut, I really hope we will not
> have any of these classes at all at the end.

Where do you advocate that they should go? For the collection extensions the obvious location is Collections. Should we just create parallel classes for List, Set, Map, etc? ie. Lists, Sets, Maps, etc.

Mike

> Rémi
> 
>> On Wed, Aug 17, 2011 at 12:24 PM,<mike.duigou at oracle.com>  wrote:
>>> Changeset: 27671980ed45
>>> Author:    mduigou
>>> Date:      2011-08-16 15:00 -0700
>>> URL:       http://hg.openjdk.java.net/lambda/lambda/jdk/rev/27671980ed45
>>> 
>>> initial small set of extension methods on Collection and List which provide functional-style variants of common operations.
>>> 
>>> Potential source incompatibility on Collection.removeAll(null) and Collection.retainAll(null) as this is now ambiguous.
>>> 
>>> ! make/java/java/FILES_java.gmk
>>> ! src/share/classes/java/util/Collection.java
>>> + src/share/classes/java/util/CollectionHelpers.java
>>> ! src/share/classes/java/util/List.java
>>> + src/share/classes/java/util/ListHelpers.java
>>> + test/java/util/Collection/Extensions.java
>>> ! test/java/util/Collection/MOAT.java
>>> + test/java/util/List/Extensions.java
>>> 
>>> 
>>> 
> 
> 



More information about the lambda-dev mailing list