Here you can find the source of commaDelimitedToList(String commaDelimited)
public static List<String> commaDelimitedToList(String commaDelimited)
//package com.java2s; /*/*w w w . j a v a 2 s .co m*/ * $Id$ * * Copyright 1998,1999,2000,2001 by Rockhopper Technologies, Inc., * 75 Trueman Ave., Haddonfield, New Jersey, 08033-2529, U.S.A. * All rights reserved. * * This software is the confidential and proprietary information * of Rockhopper Technologies, Inc. ("Confidential Information"). You * shall not disclose such Confidential Information and shall use * it only in accordance with the terms of the license agreement * you entered into with RTI. */ import java.util.Arrays; import java.util.List; public class Main { public static List<String> commaDelimitedToList(String commaDelimited) { List<String> items = Arrays.asList(commaDelimited.split("\\s*,\\s*")); return items; } }