Spec-Zone.ru › Kotlin 2

toSortedSet

kotlin-stdlib/kotlin.collections/toSortedSet

Начиная с Kotlin: 1.0

fun <T : Comparable<T>> Array<out T>.toSortedSet(): SortedSet<T>
fun ByteArray.toSortedSet(): SortedSet<Byte>
fun ShortArray.toSortedSet(): SortedSet<Short>
fun IntArray.toSortedSet(): SortedSet<Int>
fun LongArray.toSortedSet(): SortedSet<Long>
fun FloatArray.toSortedSet(): SortedSet<Float>
fun DoubleArray.toSortedSet(): SortedSet<Double>
fun BooleanArray.toSortedSet(): SortedSet<Boolean>
fun CharArray.toSortedSet(): SortedSet<Char>
fun <T : Comparable<T>> Iterable<T>.toSortedSet(): SortedSet<T>

Возвращает новый SortedSet со всеми элементами.


fun <T> Array<out T>.toSortedSet(comparator: Comparator<in T>): SortedSet<T>
fun <T> Iterable<T>.toSortedSet(comparator: Comparator<in T>): SortedSet<T>

Возвращает новый SortedSet со всеми элементами.

Элементы в возвращаемом множестве отсортированы в соответствии с заданным компаратором.

© 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-sorted-set.html

Spec-Zone.ru

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