combineMaps

fun <K, V> combineMaps(map1: Map<K, V>, preferKeys1: Set<K>, ignoreKeys1: Set<K>, map2: Map<K, V>, preferKeys2: Set<K>, ignoreKeys2: Set<K>, into: MutableMap<K, V> = HashMap()): Map<K, V>

Combine two maps together. Duplicate entries are collapsed into a single entry. It the same key maps to multiple values, an exception is thrown.