Kotlin HashSet maxWith()
Syntax & Examples
Syntax of HashSet.maxWith()
The syntax of HashSet.maxWith() extension function is:
fun <T> Iterable<T>.maxWith(comparator: Comparator<in T>): T
This maxWith() extension function of HashSet returns the first element having the largest value according to the provided comparator.