Here you can find the source of putMapByPair(String pair, Map m)
public static void putMapByPair(String pair, Map m)
//package com.java2s; //License from project: Apache License import java.util.Map; public class Main { public static void putMapByPair(String pair, Map m) { if (null == pair || "".equals(pair)) { return; }/*from w w w . j a va 2 s .c o m*/ int indexOf = pair.indexOf("="); if (-1 != indexOf) { String k = pair.substring(0, indexOf); String v = pair.substring(indexOf + 1, pair.length()); if (null != k && !"".equals(k)) { m.put(k, v); } } else { m.put("pair", ""); } } }