@Test public void testInflateGroups_emptyWorld() { String value = inflater.inflateGroups("{(foo)} bar", Sets.newHashSet("foo")); assertThat(value, equalTo("{(foo)} bar")); }
String inflateGroups(String input, Set<String> groups) { String result = input; for (String key : groups) { Optional<String> $value = world.get(key); if ($value.isPresent()) { result = result.replaceAll("\\{\\(" + key + "\\)}", $value.get()); } } return result; }
ContextInflater extends BaseContextHandler { String inflateGroups(String input, Set<String> groups) { String result = input; for (String key : groups) { Optional<String> $value = world.get(key); if ($value.isPresent()) { result = result.replaceAll("\\{\\(" + key + "\\)}", $value.get()); } } return result; } }
ContextInflater extends BaseContextHandler { String inflateGroups(String input, Set<String> groups) { String result = input; for (String key : groups) { Optional<String> $value = world.get(key); if ($value.isPresent()) { result = result.replaceAll("\\{\\(" + key + "\\)}", $value.get()); } } return result; }  }
ContextInflater extends BaseContextHandler { String inflateGroups(String input, Set<String> groups) { String result = input; for (String key : groups) { Optional<String> $value = world.get(key); if ($value.isPresent()) { result = result.replaceAll("\\{\\(" + key + "\\)}", $value.get()); } } return result; }  String inflate(String input); }
ContextInflater extends BaseContextHandler { String inflateGroups(String input, Set<String> groups) { String result = input; for (String key : groups) { Optional<String> $value = world.get(key); if ($value.isPresent()) { result = result.replaceAll("\\{\\(" + key + "\\)}", $value.get()); } } return result; }  String inflate(String input);  }