mapToList

@NotNull
@Unmodifiable
open fun <E, R> mapToList(@NotNull collection: @NotNull Collection<E>, @NotNull mapper: @NotNull (E) -> R): @NotNull @Unmodifiable List<R>

Maps stream to list

Return

unmodifiable list

Parameters

collection

collection

mapper

mapper

<E>

element

<R>

return value


@NotNull
@Unmodifiable
open fun <E, R> mapToList(@NotNull stream: @NotNull Stream<E>, @NotNull mapper: @NotNull (E) -> R): @NotNull @Unmodifiable List<R>

Maps stream to list

Return

unmodifiable list

Parameters

stream

stream

mapper

mapper

<E>

element

<R>

return value