Here you can find the source of toList(String s, String delim)
public static List toList(String s, String delim)
//package com.java2s; //License from project: Apache License import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class Main { public static List toList(String s, String delim) { if (isNull(s)) return new ArrayList(0); return Arrays.asList(s.split(delim)); }/*from w w w. jav a 2s . c om*/ public static boolean isNull(Object s) { if (s == null || s.toString().trim().length() == 0 || s.equals("null")) return true; else return false; } }