component1
Returns 1st element from the array.
If the size of this array is less than 1, throws an IndexOutOfBoundsException except in Kotlin/JS where the behavior is unspecified.
Since Kotlin
1.0Returns 1st element from the list.
Throws an IndexOutOfBoundsException if the size of this list is less than 1.
Since Kotlin
1.0Returns 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
}
Content copied to clipboard