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

Method toMap

output/java_guava/1.4.19/Maps.java:1174–1176  ·  view source on GitHub ↗

Returns an immutable map whose keys are the distinct elements of keys and whose value for each key was computed by valueFunction. The map's iteration order is the order of the first appearance of each key in keys. When there are multiple instances of a key in keys

(Iterable<K> keys, Function<? super K, V> valueFunction)

Source from the content-addressed store, hash-verified

1172
1173
1174 public static <K, V> ImmutableMap<K, V> toMap(Iterable<K> keys, Function<? super K, V> valueFunction) {
1175 return toMap(keys.iterator(), valueFunction);
1176 }
1177
1178 /**
1179 * Returns an immutable map whose keys are the distinct elements of {@code

Callers 1

toMapMethod · 0.95

Calls 8

newLinkedHashMapMethod · 0.95
copyOfMethod · 0.95
iteratorMethod · 0.65
nextMethod · 0.65
putMethod · 0.65
applyMethod · 0.65
checkNotNullMethod · 0.45
hasNextMethod · 0.45

Tested by

no test coverage detected