Spec-Zone.ru › Kotlin 1.8

sortedDescending

kotlin-stdlib / kotlin.collections / sortedDescending
Требования к платформе и версии: JVM (1.0), JS (1.0), Native (1.0)
fun <T : Comparable<T>> Array<out T>.sortedDescending(): List<T>
fun <T : Comparable<T>> Iterable<T>.sortedDescending(): List<T>
@ExperimentalUnsignedTypes fun UIntArray.sortedDescending(): List<UInt>
@ExperimentalUnsignedTypes fun ULongArray.sortedDescending(): List<ULong>
@ExperimentalUnsignedTypes fun UByteArray.sortedDescending(): List<UByte>
@ExperimentalUnsignedTypes fun UShortArray.sortedDescending(): List<UShort>

Возвращает список всех элементов, отсортированных по убыванию согласно их естественному порядку сортировки.

Сортировка стабильна. Это означает, что равные элементы сохраняют свой порядок относительно друг друга после сортировки.

Требования к платформе и версии: JVM (1.0), JS (1.0), Native (1.0)
fun ByteArray.sortedDescending(): List<Byte>
fun ShortArray.sortedDescending(): List<Short>
fun IntArray.sortedDescending(): List<Int>
fun LongArray.sortedDescending(): List<Long>
fun FloatArray.sortedDescending(): List<Float>
fun DoubleArray.sortedDescending(): List<Double>
fun CharArray.sortedDescending(): List<Char>

Возвращает список всех элементов, отсортированных по убыванию согласно их естественному порядку сортировки.

© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/sorted-descending.html

Spec-Zone.ru

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