singleOrNull (original) (raw)
Returns single element, or null
if the array is empty or has more than one element.
Since Kotlin
1.0
Returns the single element matching the given predicate, or null
if element was not found or more than one element was found.
Since Kotlin
1.0
Returns single element, or null
if the collection is empty or has more than one element.
Since Kotlin
1.0
Returns single element, or null
if the list is empty or has more than one element.
Since Kotlin
1.0
Returns single element, or null
if the array is empty or has more than one element.
Since Kotlin
1.3
Returns the single element matching the given predicate, or null
if element was not found or more than one element was found.
Since Kotlin
1.3