Here you can find the source of parseCsvList(String csvList)
public static List<String> parseCsvList(String csvList)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { /**// w ww. j a v a 2 s .c o m * Parse a comma separated string into a sequence of strings. * Whitespace surrounding the comma will be removed. */ public static List<String> parseCsvList(String csvList) { List<String> list = new ArrayList<String>(); if (csvList == null || csvList.isEmpty()) return list; String[] split = csvList.split("\\s*,\\s*"); for (String v : split) { if (!v.equals("")) list.add(v); } return list; } }