mergingAll

inline fun <K, V1, V2> mergingAll(map1: Map<out K, V1>, map2: Map<out K, V2>, operation1: (Map.Entry<K, V1>) -> Boolean, operation2: (Map.Entry<K, V2>) -> Boolean, operationMerge: (key: K, value1: V1, value2: V2) -> Boolean): Boolean

Returns true if:

  • for every entry e of map1 which key does not appear in map2 result of operation1(e) is true,

  • for every entry e of map2 which key does not appear in map1 result of operation2(e) is true,

  • for every key k appearing in map2 with v1 and in map2 with v2 result of operationMerge(k, v1, v2) is true. Returns false otherwise.

Parameters

map1

the first map to test with another.

map2

the second map to test with another.

operation1

predicate that tests an entry of the map1 which key does not appear in map2.

operation2

predicate that tests an entry of the map2 which key does not appear in map1.

operationMerge

predicate that tests triple (key, value1, value2) where key=value1 is an entry of map1 and key=value2 is an entry of map2.