void (@NotNull Project project, @NotNull List<? extends Module> modules, @NotNull Function<? super Module, String> oldNameProvider) { updateModuleNames(modules.stream().collect(Collectors.toMap(oldNameProvider::fun, Module::getName))); }