I'm wondering if these two statements are equivalent:
Map<String, List<String>> nodeToLinkMap = new HashMap<String, List<String>>();
...
// (assuming the map has something in it for this key)
List<String> links = nodeToLinkMap.get(node);
links.add(link);
nodeToLinkMap.put(node, links);
and
Map<String, List<String>> nodeToLinkMap = new HashMap<String, List<String>>();
...
// (assuming the map has something in it for this key)
nodeToLinkMap.get(node).add(link));
Is it the same pointer or does a copy get made?
Multimap
instead of rolling your own.