MCPcopy
hub / github.com/google/guava / toMap

Method toMap

guava/src/com/google/common/collect/FluentIterable.java:704–707  ·  view source on GitHub ↗

Returns an immutable map whose keys are the distinct elements of this {@code FluentIterable} and whose value for each key was computed by {@code valueFunction}. The map's iteration order is the order of the first appearance of each key in this iterable. <p>When there are multiple instances of a key

(Function<? super E, V> valueFunction)

Source from the content-addressed store, hash-verified

702 * @since 14.0
703 */
704 @SuppressWarnings("nullness") // Unsafe, but we can't do much about it now.
705 public final <V> ImmutableMap<@NonNull E, V> toMap(Function<? super E, V> valueFunction) {
706 return Maps.toMap((Iterable<@NonNull E>) getDelegate(), valueFunction);
707 }
708
709 /**
710 * Creates an index {@code ImmutableListMultimap} that contains the results of applying a

Callers

nothing calls this directly

Calls 2

toMapMethod · 0.95
getDelegateMethod · 0.95

Tested by

no test coverage detected