Balzanka / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

BiMap.getKey(value) #1355

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I would like to see a new method in BiMap offering the capability to get from a 
given Value the corresponding key (=getKey(value)). This functionality is 
offered with BiDiMap from Apache Commons-Collections, but BiMap is in general a 
cleaner solution than the BiDiMap.

See: 
http://commons.apache.org/proper/commons-collections/javadocs/api-release/org/ap
ache/commons/collections/BidiMap.html

Original issue reported on code.google.com by Philn...@gmail.com on 28 Mar 2013 at 1:55

GoogleCodeExporter commented 9 years ago
Do you think the current solution isn't clear enough?
  biMap.inverse().get(value);

Original comment by kak@google.com on 28 Mar 2013 at 2:00

GoogleCodeExporter commented 9 years ago
Personally I would prefer to have a direct function for it. If the view doesn't 
add much/any overhead, I don't see why this shouldn't be a good thing.

Original comment by Philn...@gmail.com on 19 Apr 2013 at 8:18

GoogleCodeExporter commented 9 years ago
The BiMap interface isn't Beta anymore; making a change now would probably be 
incompatible. =/

Original comment by wasserman.louis on 19 Apr 2013 at 11:20

GoogleCodeExporter commented 9 years ago
Probably? Definitely.

Original comment by kevinb@google.com on 22 Apr 2013 at 3:43

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<issue id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:12

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:08