@Test public void testWhenMultiple() { assertEquals("git clone git: + "git clone git: .apply( ImmutableMap.of("puppet.nginx.module", "git: "puppet.http.module", "git: OsFamily.UNIX)); }
@Override public Statement apply(Map<String, String> moduleProps) { Set<String> allModules = ImmutableSet.copyOf(transform( filter(moduleProps.keySet(), contains(MODULE_KEY_PATTERN)), KeyToModuleNameOrNull.INSTANCE)); Builder<Statement> statements = ImmutableSet.<Statement> builder(); for (String module : allModules) { statements.add(statementMaker.apply(filterKeys(moduleProps, isModuleSubKey(module)))); } StatementList installModules = new StatementList(statements.build()); return installModules; }
InstallAllModulesStatementFromProperties implements Function<Map<String, String>, Statement> { @Override public Statement apply(Map<String, String> moduleProps) { Set<String> allModules = ImmutableSet.copyOf(transform( filter(moduleProps.keySet(), contains(MODULE_KEY_PATTERN)), KeyToModuleNameOrNull.INSTANCE)); Builder<Statement> statements = ImmutableSet.<Statement> builder(); for (String module : allModules) { statements.add(statementMaker.apply(filterKeys(moduleProps, isModuleSubKey(module)))); } StatementList installModules = new StatementList(statements.build()); return installModules; } }
InstallAllModulesStatementFromProperties implements Function<Map<String, String>, Statement> { @Override public Statement apply(Map<String, String> moduleProps) { Set<String> allModules = ImmutableSet.copyOf(transform( filter(moduleProps.keySet(), contains(MODULE_KEY_PATTERN)), KeyToModuleNameOrNull.INSTANCE)); Builder<Statement> statements = ImmutableSet.<Statement> builder(); for (String module : allModules) { statements.add(statementMaker.apply(filterKeys(moduleProps, isModuleSubKey(module)))); } StatementList installModules = new StatementList(statements.build()); return installModules; } InstallAllModulesStatementFromProperties(StatementToInstallModule statementMaker); }
InstallAllModulesStatementFromProperties implements Function<Map<String, String>, Statement> { @Override public Statement apply(Map<String, String> moduleProps) { Set<String> allModules = ImmutableSet.copyOf(transform( filter(moduleProps.keySet(), contains(MODULE_KEY_PATTERN)), KeyToModuleNameOrNull.INSTANCE)); Builder<Statement> statements = ImmutableSet.<Statement> builder(); for (String module : allModules) { statements.add(statementMaker.apply(filterKeys(moduleProps, isModuleSubKey(module)))); } StatementList installModules = new StatementList(statements.build()); return installModules; } InstallAllModulesStatementFromProperties(StatementToInstallModule statementMaker); @Override Statement apply(Map<String, String> moduleProps); }
InstallAllModulesStatementFromProperties implements Function<Map<String, String>, Statement> { @Override public Statement apply(Map<String, String> moduleProps) { Set<String> allModules = ImmutableSet.copyOf(transform( filter(moduleProps.keySet(), contains(MODULE_KEY_PATTERN)), KeyToModuleNameOrNull.INSTANCE)); Builder<Statement> statements = ImmutableSet.<Statement> builder(); for (String module : allModules) { statements.add(statementMaker.apply(filterKeys(moduleProps, isModuleSubKey(module)))); } StatementList installModules = new StatementList(statements.build()); return installModules; } InstallAllModulesStatementFromProperties(StatementToInstallModule statementMaker); @Override Statement apply(Map<String, String> moduleProps);  }