maxBy

inline fun <T, R : Comparable<R>> Array<out T>.maxBy(selector: (T) -> R): T?(source)
inline fun <R : Comparable<R>> ByteArray.maxBy(selector: (Byte) -> R): Byte?(source)
inline fun <R : Comparable<R>> ShortArray.maxBy(selector: (Short) -> R): Short?(source)
inline fun <R : Comparable<R>> IntArray.maxBy(selector: (Int) -> R): Int?(source)
inline fun <R : Comparable<R>> LongArray.maxBy(selector: (Long) -> R): Long?(source)
inline fun <R : Comparable<R>> FloatArray.maxBy(selector: (Float) -> R): Float?(source)
inline fun <R : Comparable<R>> DoubleArray.maxBy(selector: (Double) -> R): Double?(source)
inline fun <R : Comparable<R>> BooleanArray.maxBy(selector: (Boolean) -> R): Boolean?(source)
inline fun <R : Comparable<R>> CharArray.maxBy(selector: (Char) -> R): Char?(source)
inline fun <T, R : Comparable<R>> Iterable<T>.maxBy(selector: (T) -> R): T?(source)
inline fun <K, V, R : Comparable<R>> Map<out K, V>.maxBy(selector: (Map.Entry<K, V>) -> R): Map.Entry<K, V>?(source)

Deprecated

Warning since 1.4

Error since 1.5

Hidden since 1.6

Use maxByOrNull instead.

Replace with

this.maxByOrNull(selector)

Since Kotlin

1.0

inline fun <R : Comparable<R>> UIntArray.maxBy(selector: (UInt) -> R): UInt?(source)

Deprecated

Warning since 1.4

Error since 1.5

Hidden since 1.6

Use maxByOrNull instead.

Replace with

this.maxByOrNull(selector)

Since Kotlin

1.3