Here you can find the source of commaDelimitedStringToList(String str)
public static List<String> commaDelimitedStringToList(String str)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.List; public class Main { public static List<String> commaDelimitedStringToList(String str) { if (str == null || str.length() == 0) { return new ArrayList<String>(0); }//from www .j av a 2s . c o m List<String> result = new ArrayList<String>(); String[] pieces = str.split(","); for (String piece : pieces) { result.add(piece); } return result; } }