Set<File> (@Nullable Collection<String> paths) { if (paths == null) return null; if (paths.isEmpty()) return Collections.emptySet(); LinkedHashSet<File> files = new LinkedHashSet<>(paths.size()); for (String path : paths) { if (path != null) { files.add(new File(path)); } } return Collections.unmodifiableSet(files); }