maxWithOrNull

Common
JVM
JS
Native
1.4
fun < T > Array < out T > . maxWithOrNull (
comparator : Comparator < in T >
) : T ?

(source)
fun ByteArray . maxWithOrNull (
comparator : Comparator < in Byte >
) : Byte ?

(source)
fun ShortArray . maxWithOrNull (
comparator : Comparator < in Short >
) : Short ?

(source)
fun IntArray . maxWithOrNull (
comparator : Comparator < in Int >
) : Int ?

(source)
fun LongArray . maxWithOrNull (
comparator : Comparator < in Long >
) : Long ?

(source)
fun FloatArray . maxWithOrNull (
comparator : Comparator < in Float >
) : Float ?

(source)
fun DoubleArray . maxWithOrNull (
comparator : Comparator < in Double >
) : Double ?

(source)
fun BooleanArray . maxWithOrNull (
comparator : Comparator < in Boolean >
) : Boolean ?

(source)
fun CharArray . maxWithOrNull (
comparator : Comparator < in Char >
) : Char ?

(source)
fun < T > Iterable < T > . maxWithOrNull (
comparator : Comparator < in T >
) : T ?

(source)
@ExperimentalUnsignedTypes fun UIntArray . maxWithOrNull (
comparator : Comparator < in UInt >
) : UInt ?

(source)
@ExperimentalUnsignedTypes fun ULongArray . maxWithOrNull (
comparator : Comparator < in ULong >
) : ULong ?

(source)
@ExperimentalUnsignedTypes fun UByteArray . maxWithOrNull (
comparator : Comparator < in UByte >
) : UByte ?

(source)
@ExperimentalUnsignedTypes fun UShortArray . maxWithOrNull (
comparator : Comparator < in UShort >
) : UShort ?

(source)

Returns the first element having the largest value according to the provided comparator or null if there are no elements.

Common
JVM
JS
Native
1.4
fun < K , V > Map < out K , V > . maxWithOrNull (
comparator : Comparator < in Entry < K , V > >
) : Entry < K , V > ?

(source)

Returns the first entry having the largest value according to the provided comparator or null if there are no entries.