Here you can find the source of asList(String val)
public static Collection<String> asList(String val)
//package com.java2s; //License from project: LGPL import java.util.Arrays; import java.util.Collection; import java.util.Collections; public class Main { public static Collection<String> asList(String val) { return asList(val, "\\s*,\\s*"); }/*from w ww. jav a2 s. co m*/ public static Collection<String> asList(String val, String delim) { if (!isEmpty(val)) { return Arrays.asList(val.split(delim)); } else { return Collections.emptyList(); } } public static boolean isEmpty(String v) { return (v == null || v.length() < 1); } }