component1

inline operator fun <T> Array<out T>.component1(): T (source)
inline operator fun ByteArray.component1(): Byte (source)
inline operator fun ShortArray.component1(): Short (source)
inline operator fun IntArray.component1(): Int (source)
inline operator fun LongArray.component1(): Long (source)
inline operator fun FloatArray.component1(): Float (source)
inline operator fun DoubleArray.component1(): Double (source)
inline operator fun BooleanArray.component1(): Boolean (source)
inline operator fun CharArray.component1(): Char (source)
inline operator fun <T> List<T>.component1(): T (source)

Returns 1st element from the collection.

inline operator fun <K, V> Entry<K, V>.component1(): K (source)

Returns the key component of the map entry.

This method allows to use destructuring declarations when working with maps, for example:

for ((key, value) in map) {
    // do something with the key and the value
}