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

Method toMap

corpus/java/training/guava/collect/Maps.java:1146–1149  ·  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

1144 * @since 14.0
1145 */
1146 public static <K, V> ImmutableMap<K, V> toMap(
1147 Iterable<K> keys, Function<? super K, V> valueFunction) {
1148 return toMap(keys.iterator(), valueFunction);
1149 }
1150
1151 /**
1152 * 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