uis won't open or close when console is up

This commit is contained in:
minjaesong
2019-08-11 20:42:59 +09:00
parent 419773550a
commit b63bf88cd7
7 changed files with 58 additions and 31 deletions

View File

@@ -152,4 +152,13 @@ class SortedArrayList<T: Comparable<T>>(initialSize: Int = 10) {
* Does NOT create copies!
*/
fun toArrayList() = arrayList
}
fun <T: Comparable<T>> sortedArrayListOf(vararg elements: T): SortedArrayList<T> {
val a = SortedArrayList<T>(elements.size + 1)
ReentrantLock().lock {
a.arrayList.addAll(elements)
a.arrayList.sort()
}
return a
}