Kotlin HashMap minOfWith()
Syntax & Examples


Syntax of HashMap.minOfWith()

The syntax of HashMap.minOfWith() extension function is:

fun <K, V, R> Map<out K, V>.minOfWith( comparator: Comparator<in R>, selector: (Entry<K, V>) -> R ): R

This minOfWith() extension function of HashMap returns the smallest value according to the provided comparator among all values produced by selector function applied to each entry in the map.