Java HashMap Create hashMap()

Here you can find the source of hashMap()

Description

hash Map

License

Open Source License

Declaration

public static <K, V> HashMap<K, V> hashMap() 

Method Source Code


//package com.java2s;
/*// ww  w  .j a  va  2 s  .  c  om
 * @(#)MapHelper.java 2011-9-30
 * ?????????us?????????? ? 2008-2011, Inc. All rights reserved.
 * ?s.server. Use is subject to license terms.
 */

import java.util.HashMap;

import java.util.Map;

public class Main {

    public static <K, V> HashMap<K, V> hashMap() {
        return new HashMap<K, V>();
    }

    public static <K, V> Map<K, V> hashMap(K key, V val) {
        Map<K, V> map = new HashMap<K, V>();
        map.put(key, val);
        return map;
    }
}

Related

  1. getHashMap()
  2. getHashMap()
  3. getHashMap(Object... args)
  4. getHashMapFromArrayList( ArrayList lines, int keyIndex)
  5. getHashMapFromMap( Map map, K key)
  6. hashMap()
  7. hashmap()
  8. hashMap(Entry... entries)
  9. hashMap(Entry... entries)