maxWith

abstract fun maxWith(comparator: Comparator<in T>): T

返回根据指定的比较器从序列中选择出的最大元素。

此函数类似于 Kotlin 标准库中的 maxWith 函数。

参考 kotlin.sequences.maxWith

Return

根据指定的比较器从序列中选择出的最大元素。

Parameters

comparator

用于比较元素的比较器。

Throws

如果序列为空。