You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Stephen Colebourne <sc...@btopenworld.com> on 2003/03/09 01:11:31 UTC
[collections] MultiKey
I have written and checked in a MultiKey class. This is based on a class
from Tapestry and also from a similar class I have used in my day job.
It enables multi-level map lookups to be flattened by creating a combination
hashkey, for example to lookup a filename in a specific locale by key you
might use:
String filename = (String) map.get(
new MultiKey(key, locale)
);
Stephen
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
RE: [collections] MultiKey
Posted by "Howard M. Lewis Ship" <hl...@attbi.com>.
Cool. MultiKey was a good choice, but so modest I didn't dare suggest it.
Check out BinaryDumpOutputStream, it's handy!
--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/proposals/tapestry
> -----Original Message-----
> From: Stephen Colebourne [mailto:scolebourne@btopenworld.com]
> Sent: Saturday, March 08, 2003 7:12 PM
> To: Jakarta Commons Developers List
> Subject: [collections] MultiKey
>
>
> I have written and checked in a MultiKey class. This is based
> on a class from Tapestry and also from a similar class I have
> used in my day job.
>
> It enables multi-level map lookups to be flattened by
> creating a combination hashkey, for example to lookup a
> filename in a specific locale by key you might use:
> String filename = (String) map.get(
> new MultiKey(key, locale)
> );
>
> Stephen
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org