private static <R extends Comparable<?>> SortedSet<R> merge(List<PluginScanResult> results, Function<PluginScanResult, SortedSet<R>> accessor) {
        SortedSet<R> merged = new TreeSet<>();
        for (PluginScanResult element : results) {
            merged.addAll(accessor.apply(element));
        }
        return merged;
    }
Merge one or more {@link PluginScanResult results} into one result object
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/isolation/PluginScanResult.java