Java HashMap Create newHashMap(Map m)

Here you can find the source of newHashMap(Map m)

Description

new Hash Map

License

Apache License

Declaration

public static <K, V> HashMap<K, V> newHashMap(Map<? extends K, ? extends V> m) 

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> HashMap<K, V> newHashMap() {
        return new HashMap<K, V>();
    }/* w  w  w.  j  a  v a  2s  . c  o m*/

    public static <K, V> HashMap<K, V> newHashMap(Map<? extends K, ? extends V> m) {
        return new HashMap<K, V>(m);
    }
}

Related

  1. newHashMap(int size)
  2. newHashMap(int size)
  3. newHashMap(K[] keys, V[] values)
  4. newHashMap(K[] keys, V[] values)
  5. newHashMap(Map.Entry... entries)
  6. newHashMap(Object... kv)
  7. newHashMap(T key, U value)
  8. newHashMapWithCapacity(int expectedSize, float loadFactor)
  9. toHashMap( Entry[] entries)