@Test public void testEmpty() { MyIterableHashMap<String, Integer> map = new MyIterableHashMap<>(); assertEquals(0, map.size()); assertTrue(map.isEmpty()); }
@Override public int size() { int size = 0; for(int i=0; i<data.length; i++){ if(data[i] != null){ size += data[i].size(); } } return size; }
MyIterableHashMap implements MyHashMap<K,V>, Iterable<V> { @Override public int size() { int size = 0; for(int i=0; i<data.length; i++){ if(data[i] != null){ size += data[i].size(); } } return size; } }
MyIterableHashMap implements MyHashMap<K,V>, Iterable<V> { @Override public int size() { int size = 0; for(int i=0; i<data.length; i++){ if(data[i] != null){ size += data[i].size(); } } return size; } MyIterableHashMap();  MyIterableHashMap(int capacity); }
MyIterableHashMap implements MyHashMap<K,V>, Iterable<V> { @Override public int size() { int size = 0; for(int i=0; i<data.length; i++){ if(data[i] != null){ size += data[i].size(); } } return size; } MyIterableHashMap();  MyIterableHashMap(int capacity); @Override Iterator<V> iterator(); @Override void put(K key, V value); @Override void delete(K key); @Override V get(K key); @Override int size(); }
MyIterableHashMap implements MyHashMap<K,V>, Iterable<V> { @Override public int size() { int size = 0; for(int i=0; i<data.length; i++){ if(data[i] != null){ size += data[i].size(); } } return size; } MyIterableHashMap();  MyIterableHashMap(int capacity); @Override Iterator<V> iterator(); @Override void put(K key, V value); @Override void delete(K key); @Override V get(K key); @Override int size();  }