@Test public void testContainsKey() { Map<String, String> attributes = ImmutableMap.of("submission_timestamp", "2018-03-12T21:02:18.123456Z"); Map<String, String> derived = DerivedAttributesMap.of(attributes); assertTrue(derived.containsKey("submission_timestamp")); assertTrue(derived.containsKey("submission_date")); assertTrue(derived.containsKey("submission_hour")); assertFalse(derived.containsKey("sample_id")); }
@Override public boolean containsKey(@Nullable Object key) { return (attributes.containsKey(key) || get(key) != null); }
DerivedAttributesMap extends ForwardingMap<String, String> { @Override public boolean containsKey(@Nullable Object key) { return (attributes.containsKey(key) || get(key) != null); } }
DerivedAttributesMap extends ForwardingMap<String, String> { @Override public boolean containsKey(@Nullable Object key) { return (attributes.containsKey(key) || get(key) != null); } private  DerivedAttributesMap(Map<String, String> attributes); }
DerivedAttributesMap extends ForwardingMap<String, String> { @Override public boolean containsKey(@Nullable Object key) { return (attributes.containsKey(key) || get(key) != null); } private  DerivedAttributesMap(Map<String, String> attributes); static Map<String, String> of(Map<String, String> m); @Override String get(Object key); @Override String getOrDefault(Object key, String defaultValue); @Override boolean containsKey(@Nullable Object key); }
DerivedAttributesMap extends ForwardingMap<String, String> { @Override public boolean containsKey(@Nullable Object key) { return (attributes.containsKey(key) || get(key) != null); } private  DerivedAttributesMap(Map<String, String> attributes); static Map<String, String> of(Map<String, String> m); @Override String get(Object key); @Override String getOrDefault(Object key, String defaultValue); @Override boolean containsKey(@Nullable Object key);  }