Provide minWith and maxWith to find maximum and minimum values according to the given comparator.
#KT-9002 Fixed
This commit is contained in:
@@ -4,6 +4,7 @@ import java.lang.*
|
||||
import java.util.*
|
||||
|
||||
public object Collections {
|
||||
@Deprecated("Use collection.maxWith(comparator) instead.", ReplaceWith("col.maxWith(comp)"))
|
||||
public fun <T> max(col: Collection<T>, comp: Comparator<in T>): T = java.util.max(col, comp)
|
||||
|
||||
@Deprecated("Use list.sort() instead.", ReplaceWith("list.sort()"))
|
||||
|
||||
Reference in New Issue
Block a user