Java Map Copy copy(Map> original)

Here you can find the source of copy(Map> original)

Description

copy

License

Apache License

Declaration

public static Map<String, Map<String, String>> copy(Map<String, Map<String, String>> original) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.util.HashMap;
import java.util.Map;

public class Main {
    public static Map<String, Map<String, String>> copy(Map<String, Map<String, String>> original) {
        Map<String, Map<String, String>> copy = new HashMap<>();
        if (original != null) {
            for (String key : original.keySet()) {
                copy.put(key, new HashMap<>(original.get(key)));
            }// www  .j  av a  2s .  c  o  m
        }
        return copy;
    }
}

Related

  1. copy(Map to, Map from, Object keys[])
  2. copy(Map src, Map propertyRef)
  3. copy(Map> original)
  4. copy(Map map)
  5. copy(Map master, Map copy)
  6. copy(Map src, Map dst)
  7. copyAndRemove(Map map, K key)
  8. copyDeep(Map> data)
  9. copyEntries(Map aSource, Map aTarget)