Spec-Zone.ru › Kotlin 1.8

slice

kotlin-stdlib / kotlin.collections / slice
Требования к платформе и версии: JVM (1.0), JS (1.0), Native (1.0)
fun <T> Array<out T>.slice(indices: IntRange): List<T>
fun ByteArray.slice(indices: IntRange): List<Byte>
fun ShortArray.slice(indices: IntRange): List<Short>
fun IntArray.slice(indices: IntRange): List<Int>
fun LongArray.slice(indices: IntRange): List<Long>
fun FloatArray.slice(indices: IntRange): List<Float>
fun DoubleArray.slice(indices: IntRange): List<Double>
fun BooleanArray.slice(indices: IntRange): List<Boolean>
fun CharArray.slice(indices: IntRange): List<Char>
fun <T> List<T>.slice(indices: IntRange): List<T>
@ExperimentalUnsignedTypes fun UIntArray.slice(
    indices: IntRange
): List<UInt>
@ExperimentalUnsignedTypes fun ULongArray.slice(
    indices: IntRange
): List<ULong>
@ExperimentalUnsignedTypes fun UByteArray.slice(
    indices: IntRange
): List<UByte>
@ExperimentalUnsignedTypes fun UShortArray.slice(
    indices: IntRange
): List<UShort>

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

Требования к платформе и версии: JVM (1.0), JS (1.0), Native (1.0)
fun <T> Array<out T>.slice(indices: Iterable<Int>): List<T>
fun ByteArray.slice(indices: Iterable<Int>): List<Byte>
fun ShortArray.slice(indices: Iterable<Int>): List<Short>
fun IntArray.slice(indices: Iterable<Int>): List<Int>
fun LongArray.slice(indices: Iterable<Int>): List<Long>
fun FloatArray.slice(indices: Iterable<Int>): List<Float>
fun DoubleArray.slice(indices: Iterable<Int>): List<Double>
fun BooleanArray.slice(indices: Iterable<Int>): List<Boolean>
fun CharArray.slice(indices: Iterable<Int>): List<Char>
fun <T> List<T>.slice(indices: Iterable<Int>): List<T>
@ExperimentalUnsignedTypes fun UIntArray.slice(
    indices: Iterable<Int>
): List<UInt>
@ExperimentalUnsignedTypes fun ULongArray.slice(
    indices: Iterable<Int>
): List<ULong>
@ExperimentalUnsignedTypes fun UByteArray.slice(
    indices: Iterable<Int>
): List<UByte>
@ExperimentalUnsignedTypes fun UShortArray.slice(
    indices: Iterable<Int>
): List<UShort>

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

© 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/slice.html

Spec-Zone.ru

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