Java Comma Separated List commaSeparatedToList(String str)

Here you can find the source of commaSeparatedToList(String str)

Description

comma Separated To List

License

Open Source License

Declaration

public static List<String> commaSeparatedToList(String str) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Main {
    public static List<String> commaSeparatedToList(String str) {
        if (str == null) {
            return new ArrayList<>();
        }/*from w  w w.jav  a 2  s.  c om*/
        return Arrays.asList(str.split("\\s*,\\s*"));
    }
}

Related

  1. commaSeparatedList(Object... values)
  2. commaSeparatedList(String string)
  3. commaSeparatedString(List items)
  4. commaSeparatedString(List strings)
  5. commaSeparatedStringToList(String csvListStr)
  6. commaSeperatedStringToList(String strValue)
  7. commaSepLineToList(String commSepLine)
  8. commaStringToList(String inputString)
  9. convertCommaDelimitedStringToList(String s)