From 4084416d565852eb059207e783e8659f9c987364 Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Mon, 3 Dec 2012 15:25:03 +0400 Subject: [PATCH] Remove 'inline' --- libraries/stdlib/src/kotlin/JUtilJVM.kt | 34 ++++++++++++------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/libraries/stdlib/src/kotlin/JUtilJVM.kt b/libraries/stdlib/src/kotlin/JUtilJVM.kt index 118bd4228bf..b010c4dd1f2 100644 --- a/libraries/stdlib/src/kotlin/JUtilJVM.kt +++ b/libraries/stdlib/src/kotlin/JUtilJVM.kt @@ -3,38 +3,38 @@ 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)) +public 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) +public 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()) +public fun linkedListOf(vararg values: T) : LinkedList = values.toCollection(LinkedList()) deprecated("Use linkedListOf() instead") -public inline fun linkedList(vararg values: T) : LinkedList = linkedListOf(*values) +public fun linkedList(vararg values: T) : LinkedList = linkedListOf(*values) /** Returns a new HashSet with a variable number of initial elements */ -public inline fun hashSetOf(vararg values: T) : HashSet = values.toCollection(HashSet(values.size)) +public fun hashSetOf(vararg values: T) : HashSet = values.toCollection(HashSet(values.size)) deprecated("Use hashSetOf() instead") -public inline fun hashSet(vararg values: T) : HashSet = hashSetOf(*values) +public fun hashSet(vararg values: T) : HashSet = hashSetOf(*values) /** * Returns a new [[SortedSet]] with the initial elements */ -public inline fun sortedSetOf(vararg values: T) : TreeSet = values.toCollection(TreeSet()) +public fun sortedSetOf(vararg values: T) : TreeSet = values.toCollection(TreeSet()) deprecated("Use sortedSetOf() instead") -public inline fun sortedSet(vararg values: T) : TreeSet = sortedSetOf(*values) +public fun sortedSet(vararg values: T) : TreeSet = sortedSetOf(*values) /** * Returns a new [[SortedSet]] with the given *comparator* and the initial elements */ -public inline fun sortedSetOf(comparator: Comparator, vararg values: T) : TreeSet = values.toCollection(TreeSet(comparator)) +public fun sortedSetOf(comparator: Comparator, vararg values: T) : TreeSet = values.toCollection(TreeSet(comparator)) deprecated("Use sortedSetOf() instead") -public inline fun sortedSet(comparator: Comparator, vararg values: T) : TreeSet = sortedSetOf(comparator, *values) +public fun sortedSet(comparator: Comparator, vararg values: T) : TreeSet = sortedSetOf(comparator, *values) /** * Returns a new [[HashMap]] populated with the given tuple values where the first value in each tuple @@ -42,7 +42,7 @@ public inline fun sortedSet(comparator: Comparator, vararg values: T) : Tr * * @includeFunctionBody ../../test/MapTest.kt createUsingTuples */ -public inline fun hashMapOf(vararg values: Pair): HashMap { +public fun hashMapOf(vararg values: Pair): HashMap { val answer = HashMap(values.size) /** TODO replace by this simpler call when we can pass vararg values into other methods @@ -55,7 +55,7 @@ public inline fun hashMapOf(vararg values: Pair): HashMap { } deprecated("Use hashMapOf() instead") -public inline fun hashMap(vararg values: Pair): HashMap = hashMapOf(*values) +public fun hashMap(vararg values: Pair): HashMap = hashMapOf(*values) /** * Returns a new [[SortedMap]] populated with the given tuple values where the first value in each tuple @@ -63,7 +63,7 @@ public inline fun hashMap(vararg values: Pair): HashMap = hashMa * * @includeFunctionBody ../../test/MapTest.kt createSortedMap */ -public inline fun sortedMapOf(vararg values: Pair): SortedMap { +public fun sortedMapOf(vararg values: Pair): SortedMap { val answer = TreeMap() /** TODO replace by this simpler call when we can pass vararg values into other methods @@ -76,7 +76,7 @@ public inline fun sortedMapOf(vararg values: Pair): SortedMap { } deprecated("Use sortedMapOf() instead") -public inline fun sortedMap(vararg values: Pair): SortedMap = sortedMapOf(*values) +public fun sortedMap(vararg values: Pair): SortedMap = sortedMapOf(*values) /** * Returns a new [[LinkedHashMap]] populated with the given tuple values where the first value in each tuple @@ -85,7 +85,7 @@ public inline fun sortedMap(vararg values: Pair): SortedMap = s * * @includeFunctionBody ../../test/MapTest.kt createLinkedMap */ -public inline fun linkedMapOf(vararg values: Pair): LinkedHashMap { +public fun linkedMapOf(vararg values: Pair): LinkedHashMap { val answer = LinkedHashMap(values.size) /** TODO replace by this simpler call when we can pass vararg values into other methods @@ -98,8 +98,8 @@ public inline fun linkedMapOf(vararg values: Pair): LinkedHashMap linkedMap(vararg values: Pair): LinkedHashMap = linkedMapOf(*values) +public fun linkedMap(vararg values: Pair): LinkedHashMap = linkedMapOf(*values) /** Returns the Set if its not null otherwise returns the empty set */ -public inline fun Set?.orEmpty() : Set +public fun Set?.orEmpty() : Set = if (this != null) this else Collections.EMPTY_SET as Set