import java.util.Collection;
import java.util.Iterator;
/**
*
* Copyright (C) 2009 @author bangsen
*
* This file is part of Util_Pro_Ivan. Collection from other open source
* projects. You can use it. But you should read .
*/
class StringUtils {
/**
*
* @param s
* @param delimiter
* @return
*/
public static String join(Collection> s, String delimiter) {
StringBuilder builder = new StringBuilder();
Iterator> iter = s.iterator();
while (iter.hasNext()) {
builder.append(iter.next());
if (iter.hasNext()) {
builder.append(delimiter);
}
}
return builder.toString();
}
}