@Test public void testPutAll() throws Exception { Map<Integer, Integer> testMap = Maps.newHashMap(); fillMap(10); map.putAll(testMap); for (int i = 0; i < 10; i++) { assertTrue("The map should contain the current 'i' value.", map.containsKey(i)); assertTrue("The map should contain the current 'i' value.", map.containsValue(i)); } }
@Override public void putAll(Map<? extends K, ? extends V> m) { checkNotNull(m, "The passed in map cannot be null."); m.forEach((k, v) -> items.put(serializer.encode(k), serializer.encode(v))); }
PersistentMap implements Map<K, V> { @Override public void putAll(Map<? extends K, ? extends V> m) { checkNotNull(m, "The passed in map cannot be null."); m.forEach((k, v) -> items.put(serializer.encode(k), serializer.encode(v))); } }
PersistentMap implements Map<K, V> { @Override public void putAll(Map<? extends K, ? extends V> m) { checkNotNull(m, "The passed in map cannot be null."); m.forEach((k, v) -> items.put(serializer.encode(k), serializer.encode(v))); } PersistentMap(Serializer serializer, DB database, String name); }
PersistentMap implements Map<K, V> { @Override public void putAll(Map<? extends K, ? extends V> m) { checkNotNull(m, "The passed in map cannot be null."); m.forEach((k, v) -> items.put(serializer.encode(k), serializer.encode(v))); } PersistentMap(Serializer serializer, DB database, String name); void readInto(Map<K, V> items); @Override V remove(Object key); @Override int size(); @Override boolean isEmpty(); @Override boolean containsKey(Object key); @Override boolean containsValue(Object value); @Override V get(Object key); @Override V put(K key, V value); @Override void putAll(Map<? extends K, ? extends V> m); @Override void clear(); @Override Set<K> keySet(); @Override Collection<V> values(); @Override Set<Entry<K, V>> entrySet(); @Override boolean equals(Object map); @Override int hashCode(); }
PersistentMap implements Map<K, V> { @Override public void putAll(Map<? extends K, ? extends V> m) { checkNotNull(m, "The passed in map cannot be null."); m.forEach((k, v) -> items.put(serializer.encode(k), serializer.encode(v))); } PersistentMap(Serializer serializer, DB database, String name); void readInto(Map<K, V> items); @Override V remove(Object key); @Override int size(); @Override boolean isEmpty(); @Override boolean containsKey(Object key); @Override boolean containsValue(Object value); @Override V get(Object key); @Override V put(K key, V value); @Override void putAll(Map<? extends K, ? extends V> m); @Override void clear(); @Override Set<K> keySet(); @Override Collection<V> values(); @Override Set<Entry<K, V>> entrySet(); @Override boolean equals(Object map); @Override int hashCode();  }