Here you can find the source of iterableToString(Iterable> list)
public static String iterableToString(Iterable<?> list)
//package com.java2s; /*//from w w w . ja va2s . c o m * oxTrust is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. * * Copyright (c) 2014, Gluu */ public class Main { public static String iterableToString(Iterable<?> list) { if (list == null) { return ""; } StringBuilder sb = new StringBuilder(); for (Object item : list) { sb.append(item); sb.append(","); } if (sb.length() > 0) { sb.deleteCharAt(sb.length() - 1); } return sb.toString(); } }