Couldn't you just store values for a single key in a
list (ArrayList, LinkedList, Vector)?
Extend HashMap and write your own put(Object,Object)
method that knows how to add to the existing list for
existing key, or create a new list for a new key being
put in the HashMap.
Or maybe I'm missing something....
Otis
--- "Richard R. McKinley"
<[EMAIL PROTECTED]> wrote:
> I am looking for some sort of object container like
> Hashtable, but allows
> one-to-mant mapping. That is, one key can be
> associated with multiple
> values. get()ing a key would return an Enumeration
> of associated values or
> something similar. What I have found is something
> called the Java Generic
> Library (JGL) by a company called ObjectSpace. It
> contains some 50 classes
> related to this and other issues. It is free as in
> beer, but not Free as in
> Software. Is there anything in commons or elsewhere
> (STL type stuff) with a
> Free Software License that could help me?
>
> Thanks,
>
> Richard R. McKinley
>
__________________________________________________
Do You Yahoo!?
Spot the hottest trends in music, movies, and more.
http://buzz.yahoo.com/