Kotlin HashSet find()
Syntax & Examples


Syntax of HashSet.find()

The syntax of HashSet.find() extension function is:

fun <T> Iterable<T>.find(predicate: (T) -> Boolean): T?

This find() extension function of HashSet returns the first element matching the given predicate, or null if no such element was found.