toSet

open fun <T> toSet(source: Array<T>): Set<T>

Converts the given primitive array of objects into a Set of objects.

Return

reference to a Set containing the objects.

Parameters

source

the array of objects to be converted.

<T>

the type of the object.


open fun <T> toSet(source: Collection<T>): Set<T>

Converts the given Collection of objects into a Set of objects.

Return

reference to a Set containing the objects.

Parameters

source

the list of objects to be converted.

<T>

the type of the object.