Here you can find the source of getListFromCSV(String myCsv)
Parameter | Description |
---|---|
myCsv | comma seperated values to convert to a list |
public static List<String> getListFromCSV(String myCsv)
//package com.java2s; import java.util.List; import java.util.ArrayList; public class Main { /**// w ww .ja v a 2 s . com * Convert the command seperated values to a list * @param myCsv comma seperated values to convert to a list * @return List the values that taht where derived from the * the command seperated values */ public static List<String> getListFromCSV(String myCsv) { if (null == myCsv) return null; List<String> output = new ArrayList(); String[] fields = myCsv.split(","); for (int i = 0; i < fields.length; i++) { output.add(fields[i]); } return output; } }