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

Method inferValueType

output/java_guava/1.4.17/EnumBiMap.java:99–105  ·  view source on GitHub ↗
(Map<?, V> map)

Source from the content-addressed store, hash-verified

97 }
98
99 private static <V extends Enum<V>> Class<V> inferValueType(Map<?, V> map) {
100 if (map instanceof EnumBiMap) {
101 return ((EnumBiMap<?, V>) map).valueType;
102 }
103 checkArgument(!map.isEmpty());
104 return map.values().iterator().next().getDeclaringClass();
105 }
106
107 /** Returns the associated key type. */
108

Callers 1

createMethod · 0.95

Calls 6

isEmptyMethod · 0.65
nextMethod · 0.65
iteratorMethod · 0.65
valuesMethod · 0.65
checkArgumentMethod · 0.45
getDeclaringClassMethod · 0.45

Tested by

no test coverage detected