saker.build Documentation TaskDoc JavaDoc Packages
Enumeration for specifying which value should be kept if there are multiple conflicting keys.

During merge-sort, a possible scenario is when the same keys are encountered in different iterables. In this case the sorting algorithm must decide which mapping to preserve.

Enumeration constants
Policy for declaring that the key-value pair that was added earlier should be kept.
Policy for declaring that the key-value pair that was added later should be kept.
Policy for declaring that the caller doesn't care which value is kept for conflicting keys.
Methods
public static MatchingKeyPolicy
Returns the enum constant of this type with the specified name.
public static MatchingKeyPolicy[]
Returns an array containing the constants of this enum type, in the order they are declared.
Policy for declaring that the key-value pair that was added earlier should be kept.

If a key-value pair K-V1 and K-V2 is present during the sorting, and K-V1 was added to the ConcurrentEntryMergeSorter before K-V2, then the value V1 should be kept.

Policy for declaring that the key-value pair that was added later should be kept.

If a key-value pair K-V1 and K-V2 is present during the sorting, and K-V1 was added to the ConcurrentEntryMergeSorter before K-V2, then the value V2 should be kept.

Policy for declaring that the caller doesn't care which value is kept for conflicting keys.
public static MatchingKeyPolicy valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
IllegalArgumentExceptionIf this enum type has no constant with the specified name.
NullPointerExceptionIf the argument is null.
The enum constant with the specified name.
public static MatchingKeyPolicy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (MatchingKeyPolicy c : MatchingKeyPolicy.values())
    System.out.println(c);
An array containing the constants of this enum type, in the order they are declared.