Java HashMap Create createHashMap(Object key, Object value)

Here you can find the source of createHashMap(Object key, Object value)

Description

create Hash Map

License

Open Source License

Declaration

public static Map<Object, Object> createHashMap(Object key, Object value) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

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

public class Main {
    public static Map<Object, Object> createHashMap() {
        return new HashMap<Object, Object>();
    }/*from   w  ww.j  a  v a 2  s.c  o  m*/

    public static Map<Object, Object> createHashMap(Object key, Object value) {
        Map<Object, Object> map = new HashMap<Object, Object>();
        map.put(key, value);

        return map;
    }
}

Related

  1. createHashMap()
  2. createHashMap(int expectedMapSize)
  3. createHashMap(int initialCapacity)
  4. createHashMap(int initialCapacity)
  5. createHashMap(int size)
  6. createHashMapIfNull(Map map)
  7. createHashMapWithSize(final int size)
  8. getHashMap()
  9. getHashMap()