Here you can find the source of collectionToCommaString(Collection bundleSelection)
public static String collectionToCommaString(Collection bundleSelection)
//package com.java2s; /*//from w w w.j a va 2 s . c o m * $Id$ * -------------------------------------------------------------------------------------- * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com * * The software in this package is published under the terms of the MuleSource MPL * license, a copy of which has been included with this distribution in the * LICENSE.txt file. */ import java.util.Collection; import java.util.Iterator; public class Main { public static String collectionToCommaString(Collection bundleSelection) { StringBuffer sb = new StringBuffer(); for (Iterator it = bundleSelection.iterator(); it.hasNext();) { if (sb.length() > 0) sb.append(','); sb.append(it.next().toString()); } return sb.toString(); } }