void (@NotNull Set<? extends File> files, @Nullable FileFilter filter) { if (filter != null) { for (final Iterator<? extends File> it = files.iterator(); it.hasNext();) { if (filter.accept(it.next())) { it.remove(); } } } }