W3cubDocs

/Kotlin

maxWith

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

Platform and version requirements: JVM

fun <T> Array<out T>.maxWith(
    comparator: Comparator<in T>
): T?

Platform and version requirements: JVM

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

Platform and version requirements: JVM

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

Platform and version requirements: JVM

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

Platform and version requirements: JVM

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

Platform and version requirements: JVM

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

Platform and version requirements: JVM

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

Platform and version requirements: JVM

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

Platform and version requirements: JVM

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

Platform and version requirements: JVM

fun <T> Array<out T>.maxWith(
    comparator: Comparator<in T>
): T?

Platform and version requirements: JS

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

Platform and version requirements: JS

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

Platform and version requirements: JS

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

Platform and version requirements: JS

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

Platform and version requirements: JS

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

Platform and version requirements: JS

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

Platform and version requirements: JS

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

Platform and version requirements: JS

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

Platform and version requirements: JS

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

Platform and version requirements: JS

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

inline fun <K, V> Map<out K, V>.maxWith(
    comparator: Comparator<in Entry<K, V>>
): Entry<K, V>?

Platform and version requirements: JVM

inline fun <K, V> Map<out K, V>.maxWith(
    comparator: Comparator<in Entry<K, V>>
): Entry<K, V>?

Platform and version requirements: JS

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

© 2010–2017 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/max-with.html