tried moving helper function to where the other global util functions are defined to try avoid namespace method disappearing
This commit is contained in:
@@ -19,6 +19,10 @@ inline fun linkedList<T>(vararg values: T) : LinkedList<T> = values.to(LinkedLi
|
|||||||
/** Returns a new HashSet with a variable number of initial elements */
|
/** Returns a new HashSet with a variable number of initial elements */
|
||||||
inline fun hashSet<T>(vararg values: T) : HashSet<T> = values.to(HashSet<T>(values.size))
|
inline fun hashSet<T>(vararg values: T) : HashSet<T> = values.to(HashSet<T>(values.size))
|
||||||
|
|
||||||
|
/** Returns a new hash map */
|
||||||
|
inline fun <K,V> hashMap() = HashMap<K,V>()
|
||||||
|
|
||||||
|
|
||||||
val Collection<*>.indices : IntRange
|
val Collection<*>.indices : IntRange
|
||||||
get() = 0..size-1
|
get() = 0..size-1
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,3 @@ inline fun <K,V> java.util.Map<K,V>.getOrElseUpdate(key: K, defaultValue: ()-> V
|
|||||||
return answer
|
return answer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns a new hash map */
|
|
||||||
inline fun <K,V> hashMap() = HashMap<K,V>()
|
|
||||||
Reference in New Issue
Block a user