Here you can find the source of splitList(String list, String splitRegex)
public static List<String> splitList(String list, String splitRegex)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.List; public class Main { public static List<String> splitList(String list, String splitRegex) { String[] parts = list.split(splitRegex); List<String> finalParts = new ArrayList<String>(); for (String part : parts) { if (!part.equals("")) { finalParts.add(part);/*from w w w.java 2 s. c o m*/ } } return finalParts; } public static List<String> splitList(String list) { return splitList(list, ","); } }