Java Comma Separated List commaSeparatedStringToList(String csvListStr)

Here you can find the source of commaSeparatedStringToList(String csvListStr)

Description

comma Separated String To List

License

LGPL

Declaration

public static List<String> commaSeparatedStringToList(String csvListStr) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

import java.util.ArrayList;

import java.util.List;

public class Main {
    public static List<String> commaSeparatedStringToList(String csvListStr) {
        List<String> list = new ArrayList<String>();
        if (csvListStr != null && csvListStr.trim().length() > 0) {
            String[] ignoreListArr = csvListStr.split(",");
            for (int i = 0; i < ignoreListArr.length; i++) {
                list.add(ignoreListArr[i]);
            }//from  ww  w  . j a  v a  2  s.com
        }
        return list;
    }
}

Related

  1. commaSeparatedList(Collection c)
  2. commaSeparatedList(Object... values)
  3. commaSeparatedList(String string)
  4. commaSeparatedString(List items)
  5. commaSeparatedString(List strings)
  6. commaSeparatedToList(String str)
  7. commaSeperatedStringToList(String strValue)
  8. commaSepLineToList(String commSepLine)
  9. commaStringToList(String inputString)