commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John <>
Subject Class I would like to commit to commons Collections
Date Wed, 29 Aug 2007 10:05:23 GMT

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.

For example, lets say I have a class X which has an integer i. I have 
four instances of X each with the following names and values of i.

x1 i=1
x2 i=2
x3 i=2
x4 i=5

The resulting MultiHashMap will contain the following after a call to
sortCollection(X.class, "i"); has been made.

key | Objects
1   | x1
2   | x2, x3
5   | x4

I can then get a Collection of sorted objects by asking the map for the 
key value. I find this very useful in many situations I have come 
across. I will of course make the required doc, package and src 
formatting changes to the class before submitting it.

Please can you take a look and tell me if it is worth committing this to 
the Collections repository. What is the process I need to go through 
before committing? I'm a bit pressed for time at the mo' so I can't 
really spend too much time working on the Collections API as a regular 
developer. I am a big fan of the commons Collections API and commons 
project in general, just wish I had more time to get involved.

Kind regards,

John Hunsley.
Technical Supervisor, Cy-nap Ltd.

View raw message