@Test public void setMeta() { DefaultMetaDataProvider provider = new DefaultMetaDataProvider(); assertThat(provider).isEqualTo(provider.init(ConfigurationContext.EMPTY)); provider.setMeta("foo", "a", "b"); assertThat(provider.getMetaData("foo")).isNotNull().hasSize(1); }
@Override public MetadataProvider setMeta(String property, String key, String value) { Objects.requireNonNull(property, "property null"); Objects.requireNonNull(key, "key null"); Objects.requireNonNull(value, "value null"); additionalProperties.computeIfAbsent(property, p -> new HashMap<>()) .put(key, value); return this; }
DefaultMetaDataProvider implements MetadataProvider { @Override public MetadataProvider setMeta(String property, String key, String value) { Objects.requireNonNull(property, "property null"); Objects.requireNonNull(key, "key null"); Objects.requireNonNull(value, "value null"); additionalProperties.computeIfAbsent(property, p -> new HashMap<>()) .put(key, value); return this; } }
DefaultMetaDataProvider implements MetadataProvider { @Override public MetadataProvider setMeta(String property, String key, String value) { Objects.requireNonNull(property, "property null"); Objects.requireNonNull(key, "key null"); Objects.requireNonNull(value, "value null"); additionalProperties.computeIfAbsent(property, p -> new HashMap<>()) .put(key, value); return this; }  }
DefaultMetaDataProvider implements MetadataProvider { @Override public MetadataProvider setMeta(String property, String key, String value) { Objects.requireNonNull(property, "property null"); Objects.requireNonNull(key, "key null"); Objects.requireNonNull(value, "value null"); additionalProperties.computeIfAbsent(property, p -> new HashMap<>()) .put(key, value); return this; }  @Override MetadataProvider init(ConfigurationContext context); @Override Map<String, String> getMetaData(String property); @Override MetadataProvider setMeta(String property, String key, String value); @Override MetadataProvider setMeta(String property, Map<String, String> metaData); @Override MetadataProvider reset(String property); @Override MetadataProvider reset(); @Override String toString(); }
DefaultMetaDataProvider implements MetadataProvider { @Override public MetadataProvider setMeta(String property, String key, String value) { Objects.requireNonNull(property, "property null"); Objects.requireNonNull(key, "key null"); Objects.requireNonNull(value, "value null"); additionalProperties.computeIfAbsent(property, p -> new HashMap<>()) .put(key, value); return this; }  @Override MetadataProvider init(ConfigurationContext context); @Override Map<String, String> getMetaData(String property); @Override MetadataProvider setMeta(String property, String key, String value); @Override MetadataProvider setMeta(String property, Map<String, String> metaData); @Override MetadataProvider reset(String property); @Override MetadataProvider reset(); @Override String toString();  }