Browse Source

contains-Methode implementiert

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

12
SimpleArrayMap/src/solution/SimpleArrayMap.java

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

Loading…
Cancel
Save