associate

@NotNull
@Unmodifiable
open fun <E, K, V> associate(@NotNull collection: @NotNull Collection<E>, @NotNull keyMapper: @NotNull (E) -> K, @NotNull valueMapper: @NotNull (E) -> V): @NotNull @Unmodifiable Map<K, V>

Associates collection to map

Return

unmodifiable map

Parameters

collection

collection

keyMapper

key mapper

valueMapper

value mapper

<E>

element

<K>

key

<V>

value


@NotNull
@Unmodifiable
open fun <E, K, V> associate(@NotNull stream: @NotNull Stream<E>, @NotNull keyMapper: @NotNull (E) -> K, @NotNull valueMapper: @NotNull (E) -> V): @NotNull @Unmodifiable Map<K, V>

Associates stream to map

Return

unmodifiable map

Parameters

stream

stream

keyMapper

key mapper

valueMapper

value mapper

<E>

element

<K>

key

<V>

value