Atomically replaces the entire map by the copy of the specified map.
356709
public void replaceBy(Map<? extends K, ? extends V> data) {
        Map<K, V> d = copy();
        d.clear();
        d.putAll(data);
        update(d);
    }
1173090
protected void replaceValue(Map<String, Object> content, String key, Object value) {
		if (content.containsKey(key) && value != null) {
			content.put(key, value);
		}
	}
176018
public static <K, V> Map<K, V> immutableMapCopy(Map<K, V> map) {
      if (map == null) return null;
      if (map.isEmpty()) return Collections.emptyMap();
      if (map.size() == 1) {
         Map.Entry<K, V> me = map.entrySet().iterator().next();
         return Collections.singletonMap(me.getKey(), me.getValue());
      }

      Map<? extends K, ? extends V> copy = ObjectDuplicator.duplicateMap(map);

      if (copy == null)
         copy = attemptCopyConstructor(map, Map.class);
      if (copy == null)
         copy = new HashMap<>(map);

      return new ImmutableMapWrapper<>(copy);
   }
344709
@Deprecated
  public static <K extends Comparable<K>, V> ImmutableMap<K, V> copyWithSortedKeys(
      final Map<K, V> map) {
    return ImmutableSortedMap.copyOf(map);
  }
158652
public static MapProxy create(Map<?, ?> map) {
		return (map instanceof MapProxy) ? (MapProxy) map : new MapProxy(map);
	}
246161
protected Map<String, Object> updateMap(Map<String, Object> target, Map<String, Object> source) {
        Map<String, Object> resultMap = new HashMap<String, Object>(target);

        String keyWOClassName = null;

        for (String sourceKey : source.keySet()) {
            keyWOClassName = InputUtils.removeClassName(sourceKey);

            if (target.containsKey(sourceKey) == true) {
                resultMap.put(sourceKey, source.get(sourceKey));
            } else if (target.containsKey(keyWOClassName) == true) {
                resultMap.put(keyWOClassName, source.get(keyWOClassName));
            }
        }

        return resultMap;
    }
412429
public static <K, V> Map<K, V> newMap(Map<K, V> map) {
        return Optional.ofNullable(map).map(HashMap::new)
                .orElseGet(HashMap::new);
    }
793798
public static <K, V> ImmutableMap<K, V> copyOf(Map<? extends K, ? extends V> map) {
    return new ImmutableMap<>(map);
  }
26894
public void putAll(Map<?, ?> map) {
		Assert.notNull(map, "Map must not be null");
		assertNotReadOnlySystemAttributesMap(map);
		map.forEach(this::put);
	}
187431
public V replace(K key, V val) {
       // synchronized( this ) {
            if( !containsKey(key) ) {
                return null;
            }
            return put(key, val);
        //}
    }
346536
private Map<String, Object> flatten(Map<String, Object> map) {
		Map<String, Object> result = new LinkedHashMap<>();
		flatten(null, result, map);
		return result;
	}
524555
public static <K, V> void putIntoSetMap(K key, V value, Map<? super K, Set<V>> map) {
		Set<V> list = map.get(key);
		if (list == null) {
			list = Sets.newHashSetWithExpectedSize(2);
			map.put(key, list);
		}
		list.add(value);
	}
127692
@NonNull
  public static <K, V> Map<K, V> immutableCopyOf(@NonNull Map<K, V> map) {
    return Collections.unmodifiableMap(new LinkedHashMap<>(map));
  }
416555
def _update_map(self, map, name=None, filepath=None):
        
        if name:
            map.name = name
        if filepath:
            map.filepath = filepath
        Session.commit()
50048
private static <K, V> Set<K> synchronizedCopyKeys(Map<K, V> map) {

        if (map == null) {
            return new HashSet<K>();
        }
        synchronized (map) {
            return new HashSet<K>(map.keySet());
        }
    }
454924
public void append(Map<?, ?> map) {
		if (map == null || map.size() == 0)
			return;

		for (Map.Entry<?, ?> entry : map.entrySet()) {
			put(StringConverter.toString(entry.getKey()), StringConverter.toNullableString(entry.getValue()));
		}
	}
564071
public void replace(T from, T to) throws IOException {
        List<T> copy = new ArrayList<>(data.getView());
        for (int i=0; i<copy.size(); i++) {
            if (copy.get(i).equals(from))
                copy.set(i,to);
        }
        data.replaceBy(copy);
    }