Spec-Zone.ru › Kotlin 2

toHashSet

kotlin-stdlib/kotlin.collections/toHashSet

Начиная с Kotlin: 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>

Возвращает новый HashSet, содержащий все элементы.

© 2010–2026 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/to-hash-set.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API