@Test public void forEach() { Set<PropertyKey> expected = new HashSet<>(PropertyKey.defaultKeys()); Set<PropertyKey> actual = Sets.newHashSet(); mProperties.forEach((key, value) -> actual.add(key)); assertThat(actual, is(expected)); PropertyKey newKey = new PropertyKey.Builder("forEachNew").build(); mProperties.put(newKey, "value", Source.RUNTIME); Set<PropertyKey> actual2 = Sets.newHashSet(); mProperties.forEach((key, value) -> actual2.add(key)); expected.add(newKey); assertThat(actual2, is(expected)); }
public void forEach(BiConsumer<? super PropertyKey, ? super String> action) { for (Map.Entry<PropertyKey, String> entry : entrySet()) { action.accept(entry.getKey(), entry.getValue()); } }
AlluxioProperties { public void forEach(BiConsumer<? super PropertyKey, ? super String> action) { for (Map.Entry<PropertyKey, String> entry : entrySet()) { action.accept(entry.getKey(), entry.getValue()); } } }
AlluxioProperties { public void forEach(BiConsumer<? super PropertyKey, ? super String> action) { for (Map.Entry<PropertyKey, String> entry : entrySet()) { action.accept(entry.getKey(), entry.getValue()); } } AlluxioProperties();  AlluxioProperties(AlluxioProperties alluxioProperties); }
AlluxioProperties { public void forEach(BiConsumer<? super PropertyKey, ? super String> action) { for (Map.Entry<PropertyKey, String> entry : entrySet()) { action.accept(entry.getKey(), entry.getValue()); } } AlluxioProperties();  AlluxioProperties(AlluxioProperties alluxioProperties); @Nullable String get(PropertyKey key); void clear(); void put(PropertyKey key, String value, Source source); void set(PropertyKey key, String value); void merge(Map<?, ?> properties, Source source); void remove(PropertyKey key); boolean isSet(PropertyKey key); boolean isSetByUser(PropertyKey key); Set<Map.Entry<PropertyKey, String>> entrySet(); Set<PropertyKey> keySet(); Set<PropertyKey> userKeySet(); void forEach(BiConsumer<? super PropertyKey, ? super String> action); AlluxioProperties copy(); @VisibleForTesting void setSource(PropertyKey key, Source source); Source getSource(PropertyKey key); String hash(); }
AlluxioProperties { public void forEach(BiConsumer<? super PropertyKey, ? super String> action) { for (Map.Entry<PropertyKey, String> entry : entrySet()) { action.accept(entry.getKey(), entry.getValue()); } } AlluxioProperties();  AlluxioProperties(AlluxioProperties alluxioProperties); @Nullable String get(PropertyKey key); void clear(); void put(PropertyKey key, String value, Source source); void set(PropertyKey key, String value); void merge(Map<?, ?> properties, Source source); void remove(PropertyKey key); boolean isSet(PropertyKey key); boolean isSetByUser(PropertyKey key); Set<Map.Entry<PropertyKey, String>> entrySet(); Set<PropertyKey> keySet(); Set<PropertyKey> userKeySet(); void forEach(BiConsumer<? super PropertyKey, ? super String> action); AlluxioProperties copy(); @VisibleForTesting void setSource(PropertyKey key, Source source); Source getSource(PropertyKey key); String hash();  }