component2

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

Returns 2nd element from the collection.

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

Returns the value 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
}