plus method

KtMap<K, V> plus(
  1. KtMap<K, V> map
)

Creates a new read-only map by replacing or adding entries to this map from another map.

The returned map preserves the entry iteration order of the original map. Those entries of another map that are missing in this map are iterated in the end in the order of that map.

Implementation

KtMap<K, V> plus(KtMap<K, V> map) {
  return toMutableMap()..putAll(map);
}