Kotlin HashMap maxOfWith()
Syntax & Examples
Syntax of HashMap.maxOfWith()
The syntax of HashMap.maxOfWith() extension function is:
fun <K, V, R> Map<out K, V>.maxOfWith( comparator: Comparator<in R>, selector: (Entry<K, V>) -> R ): R
This maxOfWith() extension function of HashMap returns the largest value according to the provided comparator among all values produced by selector function applied to each entry in the map.