diff --git a/SimpleArrayMap/src/solution/SimpleArrayMap.java b/SimpleArrayMap/src/solution/SimpleArrayMap.java index d375246..86580b4 100644 --- a/SimpleArrayMap/src/solution/SimpleArrayMap.java +++ b/SimpleArrayMap/src/solution/SimpleArrayMap.java @@ -102,8 +102,12 @@ public class SimpleArrayMap implements ISimpleMap { @Override public void forEach(Consumer consumer) { - // TODO Auto-generated method stub - + + for (int i = 0; i < values.length; i++) { + if (keys[i] != null) { + consumer.accept(values[i]); + } + } } @Override