You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Nazar Stasiv <ns...@gmail.com> on 2008/04/17 10:55:41 UTC
bidimap with multiple value occurence
Hello,
I want to ask about elegant way to store key,value pairs into bidimap where
value has many occurrences. It is known that if map stores key,value pair
into existing key bucket old value is replaced with new one.
Now when it comes to lookup key with the value inverse map is used, and
hence values in pairs might be equal objects not all of original keys are
stored as values. This is why I can't get all of original keys. What would
you do?
Thanks
Re: bidimap with multiple value occurence
Posted by Matt Benson <gu...@yahoo.com>.
--- Nazar Stasiv <ns...@gmail.com> wrote:
> Hello,
> I want to ask about elegant way to store key,value
> pairs into bidimap where
> value has many occurrences. It is known that if map
> stores key,value pair
> into existing key bucket old value is replaced with
> new one.
> Now when it comes to lookup key with the value
> inverse map is used, and
> hence values in pairs might be equal objects not all
> of original keys are
> stored as values. This is why I can't get all of
> original keys. What would
> you do?
BidiMap explicitly states that there should be a 1 : 1
mapping of keys to values. I would reexamine my
requirements, and probably use a regular Map...
-Matt
>
> Thanks
>
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org