maxWith
Returns the first element having the largest value according to the provided comparator.
Since Kotlin
1.7Throws
if the array is empty.
Returns the first element having the largest value according to the provided comparator.
Since Kotlin
1.7Throws
if the collection is empty.
inline fun <K, V> Map<out K, V>.maxWith(comparator: Comparator<in Map.Entry<K, V>>): Map.Entry<K, V>(source)
Returns the first entry having the largest value according to the provided comparator.
Since Kotlin
1.7Throws
if the map is empty.
inline fun <K, V> Map<out K, V>.maxWith(comparator: Comparator<in Map.Entry<K, V>>): Map.Entry<K, V>?(source)
Deprecated
Warning since 1.4
Error since 1.5
Hidden since 1.6
Use maxWithOrNull instead.
Replace with
this.maxWithOrNull(comparator)
Content copied to clipboard
Since Kotlin
1.0Deprecated
Warning since 1.4
Error since 1.5
Hidden since 1.6
Use maxWithOrNull instead.
Replace with
this.maxWithOrNull(comparator)
Content copied to clipboard