Java Map Merge merge(Map into, Map with)

Here you can find the source of merge(Map into, Map with)

Description

merge

License

Open Source License

Declaration

public static <K, V> Map<K, V> merge(Map<K, V> into, Map<K, V> with) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.*;

public class Main {
    public static <K, V> Map<K, V> merge(Map<K, V> into, Map<K, V> with) {
        Map<K, V> result = new LinkedHashMap<>(into.size() + with.size());
        result.putAll(into);//from   w w  w .ja  v  a  2  s  .  c  o m
        result.putAll(with);
        return result;
    }
}

Related

  1. merge(final Map... maps)
  2. merge(final Map> targetContext, final Map> newContext)
  3. merge(List> list)
  4. merge(Map map1, Map map2)
  5. merge(Map options, Map addition)
  6. merge(Map left, Map right)
  7. merge(Map map, K key, V value)
  8. merge(Map map, Map... maps)
  9. merge(Map master, Map copy)