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

Method transformValues

output/java_guava/1.4.18/Multimaps.java:1176–1180  ·  view source on GitHub ↗

Returns a view of a multimap where each value is transformed by a function. All other properties of the multimap, such as iteration order, are left intact. For example, the code: {@code Multimap multimap = ImmutableSetMultimap.of("a", 2, "b", -3, "b", -3, "a", 4, "c", 6

(Multimap<K, V1> fromMultimap, final Function<? super V1, V2> function)

Source from the content-addressed store, hash-verified

1174
1175
1176 public static <K, V1, V2> Multimap<K, V2> transformValues(Multimap<K, V1> fromMultimap, final Function<? super V1, V2> function) {
1177 checkNotNull(function);
1178 EntryTransformer<K, V1, V2> transformer = Maps.asEntryTransformer(function);
1179 return transformEntries(fromMultimap, transformer);
1180 }
1181
1182 /**
1183 * Returns a view of a multimap whose values are derived from the original

Callers 1

computeToStringMethod · 0.95

Calls 3

asEntryTransformerMethod · 0.95
transformEntriesMethod · 0.95
checkNotNullMethod · 0.45

Tested by

no test coverage detected