Provide minWith and maxWith to find maximum and minimum values according to the given comparator.

#KT-9002 Fixed
This commit is contained in:
Ilya Gorbunov
2015-11-30 19:57:42 +03:00
parent b5e637bed5
commit 055c71e8d0
11 changed files with 433 additions and 1 deletions
@@ -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()"))