Java CSV from getCSVList(String csvList)

Here you can find the source of getCSVList(String csvList)

Description

get CSV List

License

Open Source License

Declaration

public static List<String> getCSVList(String csvList) 

Method Source Code

//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;
    }
}

Related

  1. getAsCsv(List tags)
  2. getCSV(List l)
  3. getCSVFromList(List myList)
  4. getCSVFromList(List myList)
  5. getCSVList(String csvList)
  6. getCSVString(List items)
  7. getCsvStringsFromList(final List stringsToDelimit)
  8. getepcList(String csv)
  9. getFixedArrayListSizeFromCSV(String csvString, int returnArrayListSize)