I\'m having a bit of trouble reversing a given map and storing its reversed keys and values into another map. I have a method prototype as follows:
public st
Pseudocode, but close to real. Just use a Multimap.
Multimap ret = Multimaps.newSetMultimap(); for (Entry> entry : graph) { for(String neighbor : entry.getValue()) { ret.addTo(neighbor, entry.getKey()); } }