@Test public void testPutall() { final Map<String, Integer> data = new HashMap<>(); data.put("one", 1); data.put("two", 2); data.put("three", 3); final Map<String, Integer> map = new MapBuilder<String, Integer>() .putAll(data) .put("four", 4) .build(); assertEquals(4, map.size()); }
public MapBuilder<K, V> putAll(final Map<K, V> map) { Assertion.check() .isNotNull(map); map.forEach(this::put); return this; }
MapBuilder implements Builder<Map<K, V>> { public MapBuilder<K, V> putAll(final Map<K, V> map) { Assertion.check() .isNotNull(map); map.forEach(this::put); return this; } }
MapBuilder implements Builder<Map<K, V>> { public MapBuilder<K, V> putAll(final Map<K, V> map) { Assertion.check() .isNotNull(map); map.forEach(this::put); return this; }  }
MapBuilder implements Builder<Map<K, V>> { public MapBuilder<K, V> putAll(final Map<K, V> map) { Assertion.check() .isNotNull(map); map.forEach(this::put); return this; }  MapBuilder<K, V> putCheckKeyNotExists(final K key, final V value); MapBuilder<K, V> putAll(final Map<K, V> map); MapBuilder<K, V> put(final K key, final V value); MapBuilder<K, V> putNullable(final K key, final V value); MapBuilder<K, V> unmodifiable(); @Override Map<K, V> build(); }
MapBuilder implements Builder<Map<K, V>> { public MapBuilder<K, V> putAll(final Map<K, V> map) { Assertion.check() .isNotNull(map); map.forEach(this::put); return this; }  MapBuilder<K, V> putCheckKeyNotExists(final K key, final V value); MapBuilder<K, V> putAll(final Map<K, V> map); MapBuilder<K, V> put(final K key, final V value); MapBuilder<K, V> putNullable(final K key, final V value); MapBuilder<K, V> unmodifiable(); @Override Map<K, V> build();  }