commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <>
Subject Re: bidimap with multiple value occurence
Date Thu, 17 Apr 2008 21:23:47 GMT

--- Nazar Stasiv <> 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...


> Thanks

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

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

View raw message