Kotlin HashSet indexOfFirst()
Syntax & Examples
Syntax of HashSet.indexOfFirst()
The syntax of HashSet.indexOfFirst() extension function is:
fun <T> Iterable<T>.indexOfFirst( predicate: (T) -> Boolean ): Int
This indexOfFirst() extension function of HashSet returns index of the first element matching the given predicate, or -1 if the collection does not contain such element.