You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by paul womack <pw...@papermule.co.uk> on 2005/02/16 12:24:48 UTC
[collections] MultiHashIdentityMap ?
I *really* like the MultiMap concept; I have many
uses for it within my app.
However, I have quite a lot of well defined
"pools" of objects.
These are often used as keys to java.util.Maps; since
I *KNOW* I'm OK, I use java.util.IdentityMaps
for performance reasons.
I would very much like to have the same option with MultiHashMap.
MultiHashMap is already carefully designed to allow
the underlying "multi-ness" to be implmented by the
Collection of my choice, by over-riding createCollection();
However, MultiHashMap extends HashMap, which means my request
is no trivial to implement.
If (I suggest :-) it extended AbstractMapDecorator, the underlying
Map could be similarly versatile.
BugBear
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [collections] MultiHashIdentityMap ?
Posted by Stephen Colebourne <sc...@btopenworld.com>.
There has been demand before for MultiHashMap to extend
AbstractMapDecorator.
I support the concept of MultiMaps produced by decoration, however we cannot
change the existing MultiHashMap class.
Should you, or anyone else, implement a MultiMap based on
AbstractMapDecorator, with test cases, attached to a bugzilla call, then I
would like to add it to [collections].
Stephen
----- Original Message -----
From: "paul womack" <pw...@papermule.co.uk>
>I *really* like the MultiMap concept; I have many
> uses for it within my app.
>
> However, I have quite a lot of well defined
> "pools" of objects.
>
> These are often used as keys to java.util.Maps; since
> I *KNOW* I'm OK, I use java.util.IdentityMaps
> for performance reasons.
>
> I would very much like to have the same option with MultiHashMap.
>
> MultiHashMap is already carefully designed to allow
> the underlying "multi-ness" to be implmented by the
> Collection of my choice, by over-riding createCollection();
>
> However, MultiHashMap extends HashMap, which means my request
> is no trivial to implement.
>
> If (I suggest :-) it extended AbstractMapDecorator, the underlying
> Map could be similarly versatile.
>
> BugBear
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org