commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <scolebou...@btopenworld.com>
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
map)

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?

Stephen


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message