Iaroslav Postovalov
11/05/2019, 5:13 PMwbertan
11/05/2019, 5:25 PMLinkedHashMap ensures the order which you insert elements, and HashMap not? So maybe because you are explicitly saying you have a mutableMap you will be adding/removing?! ¯\_(ツ)_/¯turansky
11/05/2019, 5:27 PMwbertan
11/05/2019, 5:28 PM/**
* Returns an empty new [MutableMap].
*
* The returned map preserves the entry iteration order.
* @sample samples.collections.Maps.Instantiation.emptyMutableMap
*/
@SinceKotlin("1.1")
@kotlin.internal.InlineOnly
public inline fun <K, V> mutableMapOf(): MutableMap<K, V> = LinkedHashMap()
It says in the comment that.Casey Brooks
11/05/2019, 5:51 PM