Created object java.util.Collections as workaround for js-stdlib.

This commit is contained in:
Stanislav Erokhin
2015-09-04 22:38:08 +03:00
parent 377f752837
commit fb14979051
3 changed files with 24 additions and 20 deletions
+2 -2
View File
@@ -4,7 +4,7 @@
*/
import java.util.*
import java.util.Collections.max
import java.util.Collections
/*
* A field where cells live. Effectively immutable
@@ -132,7 +132,7 @@ fun <T, C : MutableCollection<T>> Array<T>.to(result: C): C {
fun makeField(s: String): Field {
val lines: List<String> = s.splitBy("\n")
val w = max<String>(lines.toList(), comparator<String> { o1, o2 ->
val w = Collections.max<String>(lines.toList(), comparator<String> { o1, o2 ->
val l1: Int = o1.size
val l2 = o2.size
l1 - l2