renamed the rather long getOrElseUpdate to a simpler getOrPut which is a bit simpler and more accurate; as a new entry is put into the Map if its null
This commit is contained in:
@@ -19,8 +19,9 @@ inline fun linkedList<T>(vararg values: T) : LinkedList<T> = values.to(LinkedLi
|
||||
/** 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))
|
||||
|
||||
/** Returns a new hash map */
|
||||
inline fun <K,V> hashMap() = HashMap<K,V>()
|
||||
inline fun <K,V> hashMap(): HashMap<K,V> = HashMap<K,V>()
|
||||
|
||||
inline fun <K,V> sortedMap(): SortedMap<K,V> = TreeMap<K,V>()
|
||||
|
||||
|
||||
val Collection<*>.indices : IntRange
|
||||
|
||||
Reference in New Issue
Block a user