Here you can find the source of split(List
public static Map<String, String> split(List<String> list, String separator)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { public static Map<String, String> split(List<String> list, String separator) { if (list == null) { return null; }//from www. ja va 2 s. c o m Map<String, String> map = new HashMap<String, String>(); if (list == null || list.size() == 0) { return map; } for (String item : list) { int index = item.indexOf(separator); if (index == -1) { map.put(item, ""); } else { map.put(item.substring(0, index), item.substring(index + 1)); } } return map; } }