From 6ed2d1560cc355f2979def6133b97c82eed799da Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Mon, 3 Dec 2012 15:24:35 +0400 Subject: [PATCH] Move arrayList() to the top --- libraries/stdlib/src/kotlin/JUtilJVM.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libraries/stdlib/src/kotlin/JUtilJVM.kt b/libraries/stdlib/src/kotlin/JUtilJVM.kt index 039a26f0034..118bd4228bf 100644 --- a/libraries/stdlib/src/kotlin/JUtilJVM.kt +++ b/libraries/stdlib/src/kotlin/JUtilJVM.kt @@ -2,6 +2,12 @@ package kotlin import java.util.* +/** Returns a new ArrayList with a variable number of initial elements */ +public inline fun arrayListOf(vararg values: T) : ArrayList = values.toCollection(ArrayList(values.size)) + +deprecated("Use arrayListOf() instead") +public inline fun arrayList(vararg values: T) : ArrayList = arrayListOf(*values) + /** Returns a new LinkedList with a variable number of initial elements */ public inline fun linkedListOf(vararg values: T) : LinkedList = values.toCollection(LinkedList()) @@ -97,9 +103,3 @@ public inline fun linkedMap(vararg values: Pair): LinkedHashMap /** Returns the Set if its not null otherwise returns the empty set */ public inline fun Set?.orEmpty() : Set = if (this != null) this else Collections.EMPTY_SET as Set - -deprecated("Use arrayListOf() instead") -public inline fun arrayList(vararg values: T) : ArrayList = arrayListOf(*values) - -/** Returns a new ArrayList with a variable number of initial elements */ -public inline fun arrayListOf(vararg values: T) : ArrayList = values.toCollection(ArrayList(values.size)) \ No newline at end of file