Stdlib: moved setOf and linkedListOf from JUtilJVM.kt to JUtil.kt.

This commit is contained in:
Zalim Bashorov
2014-09-15 22:43:05 +04:00
parent 5b80eef381
commit 4ba4484683
2 changed files with 6 additions and 6 deletions
@@ -22,6 +22,12 @@ public fun mapOf<K, V>(vararg values: Pair<K, V>): Map<K, V> = if (values.size =
/** Returns an empty read-only map */
public fun mapOf<K, V>(): Map<K, V> = stdlib_emptyMap()
/** Returns a new read-only set of given elements */
public fun setOf<T>(vararg values: T): Set<T> = values.toCollection(LinkedHashSet<T>())
/** Returns a new LinkedList with a variable number of initial elements */
public fun linkedListOf<T>(vararg values: T): LinkedList<T> = values.toCollection(LinkedList<T>())
/** Returns a new ArrayList with a variable number of initial elements */
public fun arrayListOf<T>(vararg values: T): ArrayList<T> = values.toCollection(ArrayList(values.size))
@@ -2,12 +2,6 @@ package kotlin
import java.util.*
/** Returns a new read-only set of given elements */
public fun setOf<T>(vararg values: T): Set<T> = values.toCollection(LinkedHashSet<T>())
/** Returns a new LinkedList with a variable number of initial elements */
public fun linkedListOf<T>(vararg values: T): LinkedList<T> = values.toCollection(LinkedList<T>())
/**
* Returns a new [[SortedSet]] with the initial elements
*/