Here you can find the source of map(String k, Object v)
public static Map<String, Object> map(String k, Object v)
//package com.java2s; //License from project: Apache License import java.util.HashMap; import java.util.Map; public class Main { public static Map<String, Object> map(String k, Object v) { Map<String, Object> map = new HashMap<String, Object>(1); map.put(k, v);//from ww w.j a v a2 s. co m return map; } public static Map<String, Object> map(String[] keys, Object[] values) { Map<String, Object> map = new HashMap<String, Object>(keys.length); for (int i = 0; i < keys.length; i++) { map.put(keys[i], values[i]); } return map; } }