I have an idea for a Map that I think would fit nicely in the commons
collections library.  The idea is to add a method

Set keySetForValue(Object value)

that would return the set of key's that are mapped to the given value.  For
example:

map.put("1", "2");
map.put("2", "1");
map.put("3", "3");
map.put("4", "1");

map.keySetForValue("1") returns a set containing {"2", "4"}.  

I've often found the need for doing this kind of reverse lookup when using maps
for 1-to-N relationships.  If this sounds like something that fits within the
scope of the commons collections project, let me know and I'll commit an
initial implementation.

-Ryan

__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to