W3cubDocs

/Kotlin

component5

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)
operator fun <T> Array<out T>.component5(): T
operator fun ByteArray.component5(): Byte
operator fun ShortArray.component5(): Short
operator fun IntArray.component5(): Int
operator fun LongArray.component5(): Long
operator fun FloatArray.component5(): Float
operator fun DoubleArray.component5(): Double
operator fun BooleanArray.component5(): Boolean
operator fun CharArray.component5(): Char
@ExperimentalUnsignedTypes operator fun UIntArray.component5(): UInt
@ExperimentalUnsignedTypes operator fun ULongArray.component5(): ULong
@ExperimentalUnsignedTypes operator fun UByteArray.component5(): UByte
@ExperimentalUnsignedTypes operator fun UShortArray.component5(): UShort

Returns 5th element from the array.

If the size of this array is less than 5, throws an IndexOutOfBoundsException except in Kotlin/JS where the behavior is unspecified.

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)
operator fun <T> List<T>.component5(): T

Returns 5th element from the list.

Throws an IndexOutOfBoundsException if the size of this list is less than 5.

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