Join Slack
Powered by
since mapOf() on the jvm internally uses a LinkedH...
# announcements
p
Peter Ertl
06/23/2021, 8:38 AM
since mapOf() on the jvm internally uses a LinkedHashMap which seems to keep order: so, does kotlin-mapOf() officially guarantee that the order of adding entries is preserved?
d
diesieben07
06/23/2021, 8:43 AM
Yes:
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/map-of.html
Entries of the map are iterated in the order they were specified.
👍 3
p
Peter Ertl
06/23/2021, 9:15 AM
oh nice, thank you Take
4
Views
Open in Slack
Previous
Next