@Test public void testConstructor_Set() { Set<MetadataElement> elements = new HashSet<>(); elements.add(new MetadataElement("test", "value")); MetadataCollection c = new MetadataCollection(elements); assertTrue(c.containsKey("test")); }
public boolean containsKey(String key) { boolean result = false; for (MetadataElement element : this) { if (element.getKey().equals(key)) { result = true; break; } } return result; }
MetadataCollection extends ArrayList<MetadataElement> { public boolean containsKey(String key) { boolean result = false; for (MetadataElement element : this) { if (element.getKey().equals(key)) { result = true; break; } } return result; } }
MetadataCollection extends ArrayList<MetadataElement> { public boolean containsKey(String key) { boolean result = false; for (MetadataElement element : this) { if (element.getKey().equals(key)) { result = true; break; } } return result; } MetadataCollection();  MetadataCollection(@NotNull Set<MetadataElement> elements);  MetadataCollection(@NotNull MetadataCollection metadataCollection);  MetadataCollection(@NotNull KeyValuePairBag elements);  MetadataCollection(@NotNull Map<String, String> elements);  MetadataCollection(@NotNull MetadataElement... elements); }
MetadataCollection extends ArrayList<MetadataElement> { public boolean containsKey(String key) { boolean result = false; for (MetadataElement element : this) { if (element.getKey().equals(key)) { result = true; break; } } return result; } MetadataCollection();  MetadataCollection(@NotNull Set<MetadataElement> elements);  MetadataCollection(@NotNull MetadataCollection metadataCollection);  MetadataCollection(@NotNull KeyValuePairBag elements);  MetadataCollection(@NotNull Map<String, String> elements);  MetadataCollection(@NotNull MetadataElement... elements); Set<MetadataElement> toSet(); boolean containsKey(String key); static Set<MetadataElement> asSet(Collection<MetadataElement> col); static Properties asProperties(Collection<MetadataElement> col); static Map<String, String> asMap(Collection<MetadataElement> col); }
MetadataCollection extends ArrayList<MetadataElement> { public boolean containsKey(String key) { boolean result = false; for (MetadataElement element : this) { if (element.getKey().equals(key)) { result = true; break; } } return result; } MetadataCollection();  MetadataCollection(@NotNull Set<MetadataElement> elements);  MetadataCollection(@NotNull MetadataCollection metadataCollection);  MetadataCollection(@NotNull KeyValuePairBag elements);  MetadataCollection(@NotNull Map<String, String> elements);  MetadataCollection(@NotNull MetadataElement... elements); Set<MetadataElement> toSet(); boolean containsKey(String key); static Set<MetadataElement> asSet(Collection<MetadataElement> col); static Properties asProperties(Collection<MetadataElement> col); static Map<String, String> asMap(Collection<MetadataElement> col);  }