MCPcopy
hub / github.com/antlr/antlr4 / map

Method map

runtime/Java/src/org/antlr/v4/runtime/misc/MultiMap.java:14–21  ·  view source on GitHub ↗
(K key, V value)

Source from the content-addressed store, hash-verified

12
13public class MultiMap<K, V> extends LinkedHashMap<K, List<V>> {
14 public void map(K key, V value) {
15 List<V> elementsForKey = get(key);
16 if ( elementsForKey==null ) {
17 elementsForKey = new ArrayList<V>();
18 super.put(key, elementsForKey);
19 }
20 elementsForKey.add(value);
21 }
22
23 public List<Pair<K,V>> getPairs() {
24 List<Pair<K,V>> pairs = new ArrayList<Pair<K,V>>();

Callers 15

processGrammarFilesMethod · 0.95
getElementLabelDefsMethod · 0.95
compileMethod · 0.45
compileMethod · 0.45
arrayToStringFunction · 0.45
copyFromMethod · 0.45
getTextMethod · 0.45
constructorMethod · 0.45
evalPrecedenceMethod · 0.45
toStringMethod · 0.45
constructorMethod · 0.45
evalPrecedenceMethod · 0.45

Calls 3

getMethod · 0.65
addMethod · 0.65
putMethod · 0.45

Tested by 2

compileMethod · 0.36
compileMethod · 0.36