Here you can find the source of createCollectionFromString(String value)
public static Collection createCollectionFromString(String value)
//package com.java2s; /******************************************************************************* * Copyright (c) 2009 EclipseSource and others. All rights reserved. This * program and the accompanying materials are made available under the terms of * the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html * * Contributors:// w w w . j a v a 2 s.co m * EclipseSource - initial API and implementation ******************************************************************************/ import java.util.*; public class Main { private static final String COLLECTION_SEPARATOR = ","; public static Collection createCollectionFromString(String value) { if (value == null) { return null; } final StringTokenizer t = new StringTokenizer(value, COLLECTION_SEPARATOR); final List result = new ArrayList(); while (t.hasMoreTokens()) { result.add(t.nextToken()); } return result; } }