Re: Class I would like to commit to commons Collections

2007-09-03 Thread James Carman
Sorry, but I read and replied to that email before I had my morning coffee, so I may have been a bit grumpy myself. I think that if you don't supply the map that's going to be returned, then it should be "toMap". If you do, then you're really asking to fill the map. To me, that naming convention

Re: Class I would like to commit to commons Collections

2007-09-03 Thread Stephen Kestle
Ok - my bad. Jsut as you can raed tihs snenecte wtouiht tkiinhng (smoe-waht), so I read the method sig. BTW, I wasn't being condesending, just attempting to be considerate. Honestly, no bad/hard feelings. Anyhow, fillMap seems nice. However, would the simple Map *Map(Collection c, Transfo

Re: Class I would like to commit to commons Collections

2007-09-03 Thread James Carman
Mr. Kestle, "Map CollectionUtils.toMap(Collection input, Transformer keyTransformer, Transformer valueTransformer, Map map)" I wouldn't usually reply, in the hopes that you put your code through a compiler and apologize for being condescending all by yourself, but... What I think you meant to ty

Re: Class I would like to commit to commons Collections

2007-09-02 Thread Stephen Kestle
I wouldn't usually reply, in the hopes that you re-read the method signature... C is the input collection K,V are the usual types for map There are two transformers Transformer and Transformer that transform the collection input type to the respective map key, value types. The second signature

Re: Class I would like to commit to commons Collections

2007-08-30 Thread John
Hi Stephen, I've never thought of using a Transformer, it seems like a better way of doing it without the need to add new bloat to the collections package. I've put my class and test on to JIRA COLLECTIONS-263 if you want to take a look. I'm not sure if it will sort faster than the transforme

Re: Class I would like to commit to commons Collections

2007-08-30 Thread James Carman
What is "Map" here? The Map interface only has two type parameters, right? Shouldn't it just be Map? On 8/29/07, Stephen Kestle <[EMAIL PROTECTED]> wrote: > > Hi John, > > I have not opened a ticket yet, but ... I have had very similar > requirements, and will [most-likely] be putting something

Re: Class I would like to commit to commons Collections

2007-08-29 Thread Stephen Kestle
Hi John, I have not opened a ticket yet, but ... I have had very similar requirements, and will [most-likely] be putting something in that will solve your problem. However, it will not be a class - consider this method Map CollectionUtils.toMap(Collection input, Transformer keyTransformer, T

Re: Class I would like to commit to commons Collections

2007-08-29 Thread Rahul Akolkar
On 8/29/07, John <[EMAIL PROTECTED]> wrote: > Hi, > > I'm new to the collections mailing list and I have a class I think would > be appropriate to be donated to the collections API. > Please submit enhancement requests via JIRA as outlined here [1], so they stay on radar. -Rahul [1] http://comm

Class I would like to commit to commons Collections

2007-08-29 Thread John
Hi, I'm new to the collections mailing list and I have a class I think would be appropriate to be donated to the collections API. This is an extension of the MultiHashMap and filters a given Collection by a given field. It will put the objects into the map using the field value as the key.