Here you can find the source of commafy(Iterable col, StringBuilder builder)
public static void commafy(Iterable col, StringBuilder builder)
//package com.java2s; //License from project: Apache License import java.util.Iterator; public class Main { public static void commafy(Iterable col, StringBuilder builder) { for (Iterator itr = col.iterator(); itr.hasNext();) { Object obj = itr.next(); builder.append(obj.toString()); if (itr.hasNext()) { builder.append(", "); }//w w w .j a v a2 s. co m } } }