commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <>
Subject [collections] MultiKeyMap
Date Sat, 10 Apr 2004 23:09:30 GMT
I am currently developing a MultiKeyMap for [collections]. This class
operates like a Map, but has multiple keys instead of one.
get(key1, key2, key3)
put(key1, key2, key3, value)
(choice of 2-5 keys as per MultiKey)

I have made the class implement Map, however no-one will want to ever use it
as a Map (ie. hold it in a Map variable). So, I could

1) Place the class in the map subpackage, because its map-like

2) Place the class in the main package, alongside MultiMap (the multi value

3) Create a new subpackage, together with a new interface

#3 seems like a lot of work, especially as we have little evidence of what
the interface really needs to be. #1 would make sense, except that every
other class in the map subpackage truly is a map. So I'm tending towards #2,
to join ArrayStack, BeanMap and MultiHashMap as the weird collections ;-)

Any other views?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message