Browse Source

get-Methode implementiert

vollständige_und_weitere_testate
hertero 3 years ago
committed by chris
parent
commit
d917de3b8c
  1. 12
      SimpleArrayMap/src/solution/SimpleArrayMap.java

12
SimpleArrayMap/src/solution/SimpleArrayMap.java

@ -48,7 +48,17 @@ public class SimpleArrayMap<K, V> implements ISimpleMap<K, V> {
@Override
public V get(K k) {
// TODO Auto-generated method stub
if (k == null) {
return null;
}
for (int i = 0; i < values.length; i++) {
if (k.equals(keys[i])) {
return values[i];
}
}
return null;
}

Loading…
Cancel
Save