MCPcopy Create free account
hub / github.com/antlr/codebuff / getMostFrequent

Method getMostFrequent

src/org/antlr/codebuff/misc/HashBag.java:100–111  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

98 }
99
100 public T getMostFrequent() {
101 T t = null;
102 int max = 0;
103 for (T key : data.keySet()) {
104 MutableInt count = data.get(key);
105 if ( count.asInt()>max ) {
106 max = count.asInt();
107 t = key;
108 }
109 }
110 return t;
111 }
112}

Callers

nothing calls this directly

Calls 3

asIntMethod · 0.95
keySetMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected