Spec-Zone.ru › Kotlin 1.8

maxWith

kotlin-stdlib / kotlin.collections / maxWith
Требования к платформе и версии: JVM (1.7), JS (1.7), Native (1.7)
@JvmName("maxWithOrThrow") fun <T> Array<out T>.maxWith(
    comparator: Comparator<in T>
): T
@JvmName("maxWithOrThrow") fun ByteArray.maxWith(
    comparator: Comparator<in Byte>
): Byte
@JvmName("maxWithOrThrow") fun ShortArray.maxWith(
    comparator: Comparator<in Short>
): Short
@JvmName("maxWithOrThrow") fun IntArray.maxWith(
    comparator: Comparator<in Int>
): Int
@JvmName("maxWithOrThrow") fun LongArray.maxWith(
    comparator: Comparator<in Long>
): Long
@JvmName("maxWithOrThrow") fun FloatArray.maxWith(
    comparator: Comparator<in Float>
): Float
@JvmName("maxWithOrThrow") fun DoubleArray.maxWith(
    comparator: Comparator<in Double>
): Double
@JvmName("maxWithOrThrow") fun BooleanArray.maxWith(
    comparator: Comparator<in Boolean>
): Boolean
@JvmName("maxWithOrThrow") fun CharArray.maxWith(
    comparator: Comparator<in Char>
): Char
@JvmName("maxWithOrThrow-U") @ExperimentalUnsignedTypes fun UIntArray.maxWith(
    comparator: Comparator<in UInt>
): UInt
@JvmName("maxWithOrThrow-U") @ExperimentalUnsignedTypes fun ULongArray.maxWith(
    comparator: Comparator<in ULong>
): ULong
@JvmName("maxWithOrThrow-U") @ExperimentalUnsignedTypes fun UByteArray.maxWith(
    comparator: Comparator<in UByte>
): UByte
@JvmName("maxWithOrThrow-U") @ExperimentalUnsignedTypes fun UShortArray.maxWith(
    comparator: Comparator<in UShort>
): UShort

Возвращает первый элемент, имеющий наибольшее значение в соответствии с предоставленным компаратором.

Исключения

NoSuchElementException - если массив пуст.

Требования к платформе и версии: JVM (1.7), JS (1.7), Native (1.7)
@JvmName("maxWithOrThrow") fun <T> Iterable<T>.maxWith(
    comparator: Comparator<in T>
): T

Возвращает первый элемент, имеющий наибольшее значение в соответствии с предоставленным компаратором.

Исключения

NoSuchElementException - если коллекция пуста.

Требования к платформе и версии: JVM (1.7), JS (1.7), Native (1.7)
@JvmName("maxWithOrThrow") fun <K, V> Map<out K, V>.maxWith(
    comparator: Comparator<in Entry<K, V>>
): Entry<K, V>

Возвращает первую пару, имеющую наибольшее значение в соответствии с предоставленным компаратором.

Исключения

NoSuchElementException - если карта пуста.

Требования к платформе и версии: JVM (1.0)
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") fun <T> Array<out T>.maxWith(
    comparator: Comparator<in T>
): T?
Устаревшее: Используйте maxWithOrNull вместо этого.
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") fun ByteArray.maxWith(
    comparator: Comparator<in Byte>
): Byte?
Устаревшее: Используйте maxWithOrNull вместо этого.
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") fun ShortArray.maxWith(
    comparator: Comparator<in Short>
): Short?
Устаревшее: Используйте maxWithOrNull вместо этого.
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") fun IntArray.maxWith(
    comparator: Comparator<in Int>
): Int?
Устаревшее: Используйте maxWithOrNull вместо этого.
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") fun LongArray.maxWith(
    comparator: Comparator<in Long>
): Long?
Устаревшее: Используйте maxWithOrNull вместо этого.
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") fun FloatArray.maxWith(
    comparator: Comparator<in Float>
): Float?
Устаревшее: Используйте maxWithOrNull вместо этого.
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") fun DoubleArray.maxWith(
    comparator: Comparator<in Double>
): Double?
Устаревшее: Используйте maxWithOrNull вместо этого.
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") fun BooleanArray.maxWith(
    comparator: Comparator<in Boolean>
): Boolean?
Устаревшее: Используйте maxWithOrNull вместо этого.
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") fun CharArray.maxWith(
    comparator: Comparator<in Char>
): Char?
Устаревшее: Используйте maxWithOrNull вместо этого.
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") fun <T> Iterable<T>.maxWith(
    comparator: Comparator<in T>
): T?
Устаревшее: Используйте maxWithOrNull вместо этого.
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") fun <K, V> Map<out K, V>.maxWith(
    comparator: Comparator<in Entry<K, V>>
): Entry<K, V>?
Устаревшее: Используйте maxWithOrNull вместо этого.
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") @ExperimentalUnsignedTypes fun UIntArray.maxWith(
    comparator: Comparator<in UInt>
): UInt?
Устаревшее: Используйте maxWithOrNull вместо этого.
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") @ExperimentalUnsignedTypes fun ULongArray.maxWith(
    comparator: Comparator<in ULong>
): ULong?
Устаревшее: Используйте maxWithOrNull вместо этого.
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") @ExperimentalUnsignedTypes fun UByteArray.maxWith(
    comparator: Comparator<in UByte>
): UByte?
Устаревшее: Используйте maxWithOrNull вместо этого.
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") @ExperimentalUnsignedTypes fun UShortArray.maxWith(
    comparator: Comparator<in UShort>
): UShort?
Устаревшее: Используйте maxWithOrNull вместо этого.

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

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API