Here you can find the source of commaSeparatedToList(String str)
public static List<String> commaSeparatedToList(String str)
//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*")); } }