Here you can find the source of asList(String strList, String regex)
public static List<String> asList(String strList, String regex)
//package com.java2s; //License from project: Apache License import java.util.ArrayList; import java.util.List; public class Main { public static List<String> asList(String strList, String regex) { List<String> list = new ArrayList<String>(); if (null == strList || strList.isEmpty()) { return null; } else {//from w w w . j a v a2 s . co m String[] strLists = strList.split(regex); for (String str : strLists) { list.add(str); } } return list; } }