Say I have a guava moussam. I have a value of "Foo" that can belong to one or more keys. Is there any way to find out which keys contain the "Foo" record?
You can invert multimap. You can use the Multimaps.invertFrom method for Multimaps.invertFrom .
Multimaps.invertFrom
For example, if your Multimap is Multimap<String, String>
Multimap<String, String>
Multimap<String, String> invertedMultimap = Multimaps.invertFrom(myMultimap, ArrayListMultimap.<String, String>create());
If you have an ImmutableMultimap , which is a good idea when possible, you can call it .inverse().get(v) .
ImmutableMultimap
.inverse().get(v)