void (@NotNull Map<LibraryPathType, List<String>> target, @NotNull Map<LibraryPathType, List<Path>> collected) { for (Map.Entry<LibraryPathType, List<Path>> entry : collected.entrySet()) { Set<String> pathStrings = entry.getValue() .stream() .map(v -> v.toString()) .collect(Collectors.toSet()); target.computeIfAbsent(entry.getKey(), ignore -> new SmartList<>()).addAll(pathStrings); } }