maxWith

fun <T> Array<out T>.maxWith(comparator: Comparator<in T>): T?(source)
fun ByteArray.maxWith(comparator: Comparator<in Byte>): Byte?(source)
fun ShortArray.maxWith(comparator: Comparator<in Short>): Short?(source)
fun IntArray.maxWith(comparator: Comparator<in Int>): Int?(source)
fun LongArray.maxWith(comparator: Comparator<in Long>): Long?(source)
fun FloatArray.maxWith(comparator: Comparator<in Float>): Float?(source)
fun CharArray.maxWith(comparator: Comparator<in Char>): Char?(source)
fun <T> Iterable<T>.maxWith(comparator: Comparator<in T>): T?(source)
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)

Since Kotlin

1.0

Deprecated

Warning since 1.4

Error since 1.5

Hidden since 1.6

Use maxWithOrNull instead.

Replace with

this.maxWithOrNull(comparator)

Since Kotlin

1.3