Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 69529 invoked from network); 27 Jan 2003 17:53:11 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 27 Jan 2003 17:53:11 -0000 Received: (qmail 29814 invoked by uid 97); 27 Jan 2003 17:54:35 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@jakarta.apache.org Received: (qmail 29771 invoked by uid 97); 27 Jan 2003 17:54:35 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 29747 invoked by uid 50); 27 Jan 2003 17:54:34 -0000 Date: 27 Jan 2003 17:54:34 -0000 Message-ID: <20030127175434.29745.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: commons-dev@jakarta.apache.org Cc: Subject: DO NOT REPLY [Bug 16465] New: - ChainedHashMap new Java Collection Object X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16465 ChainedHashMap new Java Collection Object Summary: ChainedHashMap new Java Collection Object Product: Commons Version: unspecified Platform: All OS/Version: All Status: NEW Severity: Enhancement Priority: Other Component: Collections AssignedTo: commons-dev@jakarta.apache.org ReportedBy: jesse_chan@merck.com Initially I submitted ChainedHashMap to the commons-dev@jakarta.apache.org mailing-list and Stephen told me to submit this in Bugzilla so a committer would remember to look at it. Thanks. You'll have to go back to the mailing list to get the code, this bug entry is just a reminder. Email dialogue below. Jesse Chan --- Primarily its a matter of a committer having time to look at it. At present, there is no push for a release of collections, although I suspect it may come. At that time the loose ends tend to get tidied. Anyway, its on the list of things to do. (Also, a Bugzilla entry may help us to remember ;-) Stephen > from: "Chan, Jesse Rosetta" > I was wondering if my last submission of ChainedHashMap (attached) will make > it into Jakarta. Everything is in place for submission except for the small > bits outlined below... and I think it answers the criteria you mentioned > below. I would really like to contribute it to Jakarta and help out. I > feel this is a complete implementation. Any information would be greatly > appreciated. Thanks. > > -- > Jesse Chan > Software Engineer, LIMS > Merck Research Laboratories > Rosetta Inpharmatics LLC. > Email: jesse_chan@merck.com > > > -----Original Message----- > From: Chan, Jesse Rosetta > Sent: Friday, January 10, 2003 12:36 PM > To: 'Jakarta Commons Developers List' > Subject: RE: [SUBMIT] jakarta.commons.Collections.ChainedHashMap > > > ChainedHashMap and ChainedHashMapTest (the JUnit test) has been updated and > I am submitting everything again. It is now serializable. Again, I am > submitting this to Jakarta. Several changes to it can be, as Stephen and > Rich suggest, implementing MultiMap interface, change the package name, take > off the copyright (I work for Rosetta, Merck Research Labs and this has been > okay'd by my boss) but please leave my name as the primary author. Thanks. > > It is slightly different than MultiHashMap in the fact that MultiHashMap > returns a Collection while ChainedHashMap returns an ArrayList on a get. > While MultiHashMap is more generic, it does not guarantee the order of the > values for a key, if you return into an "incorrect" Collection, such as a > HashMap. While a ChainedHashMap returns a single Object (based on index) or > an ArrayList - which guarantees order. While this difference is not very > substantial, the reasoning behind ChainedHashMap, was order does matter. So > if you put a lot of values for a key, they should be in the order they were > put in. Is this sufficient enough to warrant difference between > MultiHashMap? There also are a lot more convenience methods in > ChainedHashMap than MultiHashMap. I feel this is a very complete > implementation. So if this warrants enough difference than MultiHashMap, > then I suppose ChainedHashMap can implement MultiMap and stand on its own in > the Collections package. What are your thoughts, Stephen? Or anyone else? > > Not quite certain what this sentence means: > > > - provide a use case for the difference applicable to server side Java > > ChainedHashMap is asynchronous but can be synchronized since it extends > HashMap. So you can do the following: > ChainedHashMap chm = (ChainedHashMap)Collections.synchronizedMap( new > ChainedHashMap(...) ); > > Enjoy! > > -- > Jesse Chan > Software Engineer, LIMS > Merck Research Laboratories > Rosetta Inpharmatics LLC. > Email: jesse_chan@merck.com > > > > -----Original Message----- > > From: Stephen Colebourne [mailto:scolebourne@btopenworld.com] > > Sent: Tuesday, January 07, 2003 4:27 PM > > To: Jakarta Commons Developers List > > Subject: Re: [SUBMIT] jakarta.commons.Collections.ChainedHashMap > > > > > > Rich is correct here. To be included, I would suggest that > > ChainedHashMap > > would need to > > - implement MultiMap > > - demonstrate sufficient difference from MultiHashMap > > - provide a use case for the difference applicable to server side Java > > > > Alternatively, patches to improve MultiHashMap are welcome. > > > > Stephen > > > > ----- Original Message ----- > > From: "Chan, Jesse Rosetta" > > To: "'Jakarta Commons Developers List'" > > > > Sent: Monday, January 06, 2003 10:11 PM > > Subject: RE: [SUBMIT] jakarta.commons.Collections.ChainedHashMap > > > > > > > Thanks for the advice, Rich. I just looked at Jakarta > > Commons Collections > > > Package API for MultiMap and MultiHashMap, it appears that > > MultiMap would > > be > > > a good interface for ChainedHashMap to implement. I have submitted > > > ChainedHashMap to Jakarta, so obviously the people that > > make the decisions > > > can modify it freely :) It appears that ChainedHashMap > > already implements > > > all the methods in the MultiMap interface except the getName method. > > > (Remember ChainedHashMap extends HashMap). Just looking at the > > MulitHashMap > > > API, it looks as though there is overlap between MultiHashMap and > > > ChainedHashMap. However, it looks as though MultiMap is > > more generic than > > > ChainedHashMap since it returns a Collection instead of, say, an > > ArrayList. > > > Hmmm... > > > > > > -- > > > Jesse Chan > > > Software Engineer, LIMS > > > Merck Research Laboratories > > > Rosetta Inpharmatics LLC. > > > Email: jesse_chan@merck.com > > > > > > > --- original message --- > > > > > > > > Hi Jesse > > > > > > > > Welcome! I'm new around here too, so hopefully someone > > will jump in if > > > > I'm wrong about this. > > > > > > > > ChainedHashMap should probably extend the MultiMap > > interface, which is > > > > used for mapping keys to collections of values. Also > > ChainedHashMap > > > > seems to be very similar to MultiHashMap (although > > > > ChainedHashMap has a > > > > much richer set of operations). Perhaps you could have a look at > > > > MultiHashMap to see whether ChainedHashMap should be > > merged with this > > > > class or whether it should stand on its own. > > > > > > > > Rich -- To unsubscribe, e-mail: For additional commands, e-mail: