Here you can find the source of getCSVList(String csvList)
public static List<String> getCSVList(String csvList)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static List<String> getCSVList(String csvList) { if (csvList == null || csvList.length() == 0) return Collections.emptyList(); List<String> ret = new ArrayList<String>(Arrays.asList(csvList.split(","))); Iterator<String> iter = ret.iterator(); while (iter.hasNext()) { final String next = iter.next(); if (next == null || next.length() == 0) { iter.remove();//from w w w. ja v a 2s. c om } } return ret; } }