Here you can find the source of asList(String valuesSeparatedBy, String delimiter)
public static ArrayList<String> asList(String valuesSeparatedBy, String delimiter)
//package com.java2s; //License from project: LGPL import java.util.ArrayList; public class Main { public static ArrayList<String> asList(String valuesSeparatedBy, String delimiter) { ArrayList<String> retVal = new ArrayList<String>(); String[] pieces = valuesSeparatedBy.split(delimiter); for (String piece : pieces) { retVal.add(piece.trim());/*from w ww. j av a 2 s. c o m*/ } return retVal; } }