Java Map Create createMap(Map map)

Here you can find the source of createMap(Map map)

Description

create Map

License

Apache License

Declaration

public static <K, V> Map<K, V> createMap(Map<K, V> map) 

Method Source Code

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

import java.util.HashMap;

import java.util.Map;

public class Main {

    public static <K, V> Map<K, V> createMap(Map<K, V> map) {
        if (map == null) {
            return null;
        }/*from w  w  w  .  ja v a2s  . co m*/
        Map<K, V> result = new HashMap<K, V>();
        result.putAll(map);
        return result;
    }
}

Related

  1. createMap(Iterable> entries)
  2. createMap(K k1, V v1)
  3. createMap(K[] keys, V[] values)
  4. createMap(List keys, List values)
  5. createMap(List keys, List values)
  6. createMap(Object keys[], Object values[])
  7. createMap(Object... args)
  8. createMap(Object... objects)
  9. createMap(Object... objects)

  10. HOME | Copyright © www.java2s.com 2016