W3cubDocs

/Kotlin

flatMapIndexedTo

Platform and version requirements: JVM (1.4), JS (1.4), Native (1.4)
@JvmName("flatMapIndexedIterableTo") inline fun <T, R, C : MutableCollection<in R>> Array<out T>.flatMapIndexedTo(
    destination: C, 
    transform: (index: Int, T) -> Iterable<R>
): C
@JvmName("flatMapIndexedIterableTo") inline fun <R, C : MutableCollection<in R>> ByteArray.flatMapIndexedTo(
    destination: C, 
    transform: (index: Int, Byte) -> Iterable<R>
): C
@JvmName("flatMapIndexedIterableTo") inline fun <R, C : MutableCollection<in R>> ShortArray.flatMapIndexedTo(
    destination: C, 
    transform: (index: Int, Short) -> Iterable<R>
): C
@JvmName("flatMapIndexedIterableTo") inline fun <R, C : MutableCollection<in R>> IntArray.flatMapIndexedTo(
    destination: C, 
    transform: (index: Int, Int) -> Iterable<R>
): C
@JvmName("flatMapIndexedIterableTo") inline fun <R, C : MutableCollection<in R>> LongArray.flatMapIndexedTo(
    destination: C, 
    transform: (index: Int, Long) -> Iterable<R>
): C
@JvmName("flatMapIndexedIterableTo") inline fun <R, C : MutableCollection<in R>> FloatArray.flatMapIndexedTo(
    destination: C, 
    transform: (index: Int, Float) -> Iterable<R>
): C
@JvmName("flatMapIndexedIterableTo") inline fun <R, C : MutableCollection<in R>> DoubleArray.flatMapIndexedTo(
    destination: C, 
    transform: (index: Int, Double) -> Iterable<R>
): C
@JvmName("flatMapIndexedIterableTo") inline fun <R, C : MutableCollection<in R>> BooleanArray.flatMapIndexedTo(
    destination: C, 
    transform: (index: Int, Boolean) -> Iterable<R>
): C
@JvmName("flatMapIndexedIterableTo") inline fun <R, C : MutableCollection<in R>> CharArray.flatMapIndexedTo(
    destination: C, 
    transform: (index: Int, Char) -> Iterable<R>
): C
@JvmName("flatMapIndexedSequenceTo") inline fun <T, R, C : MutableCollection<in R>> Array<out T>.flatMapIndexedTo(
    destination: C, 
    transform: (index: Int, T) -> Sequence<R>
): C
@ExperimentalUnsignedTypes inline fun <R, C : MutableCollection<in R>> UIntArray.flatMapIndexedTo(
    destination: C, 
    transform: (index: Int, UInt) -> Iterable<R>
): C
@ExperimentalUnsignedTypes inline fun <R, C : MutableCollection<in R>> ULongArray.flatMapIndexedTo(
    destination: C, 
    transform: (index: Int, ULong) -> Iterable<R>
): C
@ExperimentalUnsignedTypes inline fun <R, C : MutableCollection<in R>> UByteArray.flatMapIndexedTo(
    destination: C, 
    transform: (index: Int, UByte) -> Iterable<R>
): C
@ExperimentalUnsignedTypes inline fun <R, C : MutableCollection<in R>> UShortArray.flatMapIndexedTo(
    destination: C, 
    transform: (index: Int, UShort) -> Iterable<R>
): C

Appends all elements yielded from results of transform function being invoked on each element and its index in the original array, to the given destination.

Platform and version requirements: JVM (1.4), JS (1.4), Native (1.4)
@JvmName("flatMapIndexedIterableTo") inline fun <T, R, C : MutableCollection<in R>> Iterable<T>.flatMapIndexedTo(
    destination: C, 
    transform: (index: Int, T) -> Iterable<R>
): C
@JvmName("flatMapIndexedSequenceTo") inline fun <T, R, C : MutableCollection<in R>> Iterable<T>.flatMapIndexedTo(
    destination: C, 
    transform: (index: Int, T) -> Sequence<R>
): C

Appends all elements yielded from results of transform function being invoked on each element and its index in the original collection, to the given destination.

© 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/flat-map-indexed-to.html