Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)
fun <T> Array<out T>.toHashSet(): HashSet<T>
fun ByteArray.toHashSet(): HashSet<Byte>
fun ShortArray.toHashSet(): HashSet<Short>
fun IntArray.toHashSet(): HashSet<Int>
fun LongArray.toHashSet(): HashSet<Long>
fun FloatArray.toHashSet(): HashSet<Float>
fun DoubleArray.toHashSet(): HashSet<Double>
fun BooleanArray.toHashSet(): HashSet<Boolean>
fun CharArray.toHashSet(): HashSet<Char>
fun <T> Iterable<T>.toHashSet(): HashSet<T>

Returns a new HashSet of all elements.

© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.