mapToSet

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

Maps stream to set

Return

unmodifiable set

Parameters

collection

collection

mapper

mapper

<E>

element

<R>

return value


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

Maps stream to set

Return

unmodifiable set

Parameters

stream

stream

mapper

mapper

<E>

element

<R>

return value