class StringUtils {

    public static String join(final Iterable<? extends Object> iterable, final String delim) {
        final StringBuilder sb = new StringBuilder();
        if (iterable != null) {
            final Iterator<? extends Object> iter = iterable.iterator();
            if (iter.hasNext()) {
                final Object next = iter.next();
                sb.append(next.toString());
            }
            while (iter.hasNext()) {
                final Object next = iter.next();
                sb.append(delim + next.toString());
            }
        }
        return sb.toString();
    }

}