@Test public void loadConfiguration() { Collection<TaggedPropertySet> taggedPropertySets = store.parseConfiguration(); assertEquals(3, taggedPropertySets.size()); }
public Collection<TaggedPropertySet> parseConfiguration() { Map<String, TaggedPropertySet> propertySets = new HashMap<>(); for (Object configurationObject : configurationObjects) { TaggedPropertySet taggedPropertySet = createPropertySetForObject(configurationObject); if (propertySets.containsKey(taggedPropertySet.tag())) { TaggedPropertySet orginialSet = propertySets.get(taggedPropertySet.tag()); orginialSet.getProperties().putAll(taggedPropertySet.getProperties()); propertySets.put(taggedPropertySet.tag(), orginialSet); } else { propertySets.put(taggedPropertySet.tag(), taggedPropertySet); } } return propertySets.values(); }
ObjectConfigurationStore implements ConfigurationStore { public Collection<TaggedPropertySet> parseConfiguration() { Map<String, TaggedPropertySet> propertySets = new HashMap<>(); for (Object configurationObject : configurationObjects) { TaggedPropertySet taggedPropertySet = createPropertySetForObject(configurationObject); if (propertySets.containsKey(taggedPropertySet.tag())) { TaggedPropertySet orginialSet = propertySets.get(taggedPropertySet.tag()); orginialSet.getProperties().putAll(taggedPropertySet.getProperties()); propertySets.put(taggedPropertySet.tag(), orginialSet); } else { propertySets.put(taggedPropertySet.tag(), taggedPropertySet); } } return propertySets.values(); } }
ObjectConfigurationStore implements ConfigurationStore { public Collection<TaggedPropertySet> parseConfiguration() { Map<String, TaggedPropertySet> propertySets = new HashMap<>(); for (Object configurationObject : configurationObjects) { TaggedPropertySet taggedPropertySet = createPropertySetForObject(configurationObject); if (propertySets.containsKey(taggedPropertySet.tag())) { TaggedPropertySet orginialSet = propertySets.get(taggedPropertySet.tag()); orginialSet.getProperties().putAll(taggedPropertySet.getProperties()); propertySets.put(taggedPropertySet.tag(), orginialSet); } else { propertySets.put(taggedPropertySet.tag(), taggedPropertySet); } } return propertySets.values(); } ObjectConfigurationStore(); private  ObjectConfigurationStore(List<Object> configurationObjects); }
ObjectConfigurationStore implements ConfigurationStore { public Collection<TaggedPropertySet> parseConfiguration() { Map<String, TaggedPropertySet> propertySets = new HashMap<>(); for (Object configurationObject : configurationObjects) { TaggedPropertySet taggedPropertySet = createPropertySetForObject(configurationObject); if (propertySets.containsKey(taggedPropertySet.tag())) { TaggedPropertySet orginialSet = propertySets.get(taggedPropertySet.tag()); orginialSet.getProperties().putAll(taggedPropertySet.getProperties()); propertySets.put(taggedPropertySet.tag(), orginialSet); } else { propertySets.put(taggedPropertySet.tag(), taggedPropertySet); } } return propertySets.values(); } ObjectConfigurationStore(); private  ObjectConfigurationStore(List<Object> configurationObjects); ObjectConfigurationStore addObject(Object configurationObject); Collection<TaggedPropertySet> parseConfiguration(); }
ObjectConfigurationStore implements ConfigurationStore { public Collection<TaggedPropertySet> parseConfiguration() { Map<String, TaggedPropertySet> propertySets = new HashMap<>(); for (Object configurationObject : configurationObjects) { TaggedPropertySet taggedPropertySet = createPropertySetForObject(configurationObject); if (propertySets.containsKey(taggedPropertySet.tag())) { TaggedPropertySet orginialSet = propertySets.get(taggedPropertySet.tag()); orginialSet.getProperties().putAll(taggedPropertySet.getProperties()); propertySets.put(taggedPropertySet.tag(), orginialSet); } else { propertySets.put(taggedPropertySet.tag(), taggedPropertySet); } } return propertySets.values(); } ObjectConfigurationStore(); private  ObjectConfigurationStore(List<Object> configurationObjects); ObjectConfigurationStore addObject(Object configurationObject); Collection<TaggedPropertySet> parseConfiguration();  }