google / guava

Google core libraries for Java
Apache License 2.0
50.14k stars 10.89k forks source link

ForwardingBiMap is absent #3906

Open lowasser opened 4 years ago

lowasser commented 4 years ago

There is a Forwarding variant for every other interface, as far as I can tell, but not ForwardingBiMap. This just came up on StackOverflow.

lowasser commented 4 years ago

ForwardingBiMap in particular may be tricky because almost any change to it requires nontrivial implementation work on its inverse() view as well, which may just mean that it's no easier to use a hypothetical ForwardingBiMap than to extend ForwardingMap and implement BiMap.

I'm not sure what the best way to document this is, though, or even if the best solution is to just make ForwardingBiMap add no additional implementations to ForwardingMap, just exist as an alias to document what special work you need to do.