MCPcopy Index your code
hub / github.com/antlr/codebuff / map

Method map

output/java8/1.4.13/MultiMap.java:36–43  ·  view source on GitHub ↗
(K key, V value)

Source from the content-addressed store, hash-verified

34
35public class MultiMap<K, V> extends LinkedHashMap<K,List<V>> {
36 public void map(K key, V value) {
37 List<V> elementsForKey = get(key);
38 if ( elementsForKey==null ) {
39 elementsForKey = new ArrayList<V>();
40 super.put(key, elementsForKey);
41 }
42 elementsForKey.add(value);
43 }
44}

Callers 1

addMethod · 0.45

Calls 3

getMethod · 0.65
putMethod · 0.65
addMethod · 0.65

Tested by

no test coverage detected