minOfWithOrNull

abstract fun <R> minOfWithOrNull(comparator: Comparator<in R>, selector: (Map.Entry<K, V>) -> R): R?

返回按给定比较器和选择器函数选择的最小元素的值,如果集合为空,则返回 null。

Return

按给定比较器和选择器函数选择的最小元素的值,如果集合为空,则返回 null。

Parameters

comparator

用于比较元素的比较器。

selector

用于选择元素的选择器函数。