Here you can find the source of internalSeparate(StringBuilder buff, Iterable> args, String separator, String useWhenNone)
public static void internalSeparate(StringBuilder buff, Iterable<?> args, String separator, String useWhenNone)
//package com.java2s; //License from project: LGPL import java.util.Iterator; public class Main { public static void internalSeparate(StringBuilder buff, Iterable<?> args, String separator, String useWhenNone) { Iterator<?> i = args.iterator(); if (i.hasNext()) { for (;;) { Object thing = i.next(); buff.append(thing.toString()); if (i.hasNext()) { buff.append(separator); } else break; }//from ww w . ja va2 s . c o m } else { buff.append(useWhenNone); } } }