Java Map Copy copy(Map to, Map from, Object keys[])

Here you can find the source of copy(Map to, Map from, Object keys[])

Description

copy

License

Apache License

Declaration

public static final Map copy(Map to, Map from, Object keys[]) 

Method Source Code

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

import java.util.HashMap;

import java.util.Map;

public class Main {

    public static final Map copy(Map to, Map from, Object keys[]) {
        if (from == null || keys == null)
            return to;
        if (to == null)
            to = new HashMap();
        for (int i = 0; i < keys.length; i++)
            to.put(keys[i], from.get(keys[i]));
        return to;
        // for(int i=0;)
    }/*from   w  w w  .  jav a  2  s  . c  o m*/
}

Related

  1. copy(final Map source)
  2. copy(Map dest, Map src)
  3. copy(Map master, Map slave)
  4. copy(Map src, Map propertyRef)
  5. copy(Map> original)
  6. copy(Map map)
  7. copy(Map master, Map copy)