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