Package org.sosy_lab.common.collect
Interface PersistentSortedMaps.MergeConflictHandler<K,V>
-
- Enclosing class:
- PersistentSortedMaps
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public static interface PersistentSortedMaps.MergeConflictHandler<K,V>
A callback that is used when a key with two different values is encountered during the merge of two maps.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description V
resolveConflict(K key, V value1, V value2)
Resolve a conflict for one given key.
-
-
-
Method Detail
-
resolveConflict
V resolveConflict(K key, V value1, V value2)
Resolve a conflict for one given key. This handler is called only with two values that are not considered equal according to the usedEquivalence
. One of the values may benull
, which means that the corresponding map containsnull
as value for this key. The handler may returnnull
, and in this case the resulting map will contain a mappingkey -> null
.- Parameters:
key
- The key.value1
- The value from the first map.value2
- The value from the second map.- Returns:
- The value that should be put into the resulting map.
-
-