Browse Source

forEach-Methode implementiert

vollständige_und_weitere_testate
hertero 3 years ago
committed by chris
parent
commit
71424a8601
  1. 8
      SimpleArrayMap/src/solution/SimpleArrayMap.java

8
SimpleArrayMap/src/solution/SimpleArrayMap.java

@ -102,8 +102,12 @@ public class SimpleArrayMap<K, V> implements ISimpleMap<K, V> {
@Override
public void forEach(Consumer<? super V> consumer) {
// TODO Auto-generated method stub
for (int i = 0; i < values.length; i++) {
if (keys[i] != null) {
consumer.accept(values[i]);
}
}
}
@Override

Loading…
Cancel
Save