|
|
@@ -240,14 +240,14 @@ public class StringUtil { |
|
|
|
* @param delim the delimiter character(s) to use. (null value will join with no delimiter) |
|
|
|
* @return a String of all values in the list seperated by the delimiter |
|
|
|
*/ |
|
|
|
public static String join(Collection<String> list, String delim) { |
|
|
|
public static String join(Collection<? extends Object> list, String delim) { |
|
|
|
if (list == null || list.size() < 1) |
|
|
|
return null; |
|
|
|
StringBuffer buf = new StringBuffer(); |
|
|
|
Iterator i = list.iterator(); |
|
|
|
|
|
|
|
while (i.hasNext()) { |
|
|
|
buf.append((String) i.next()); |
|
|
|
buf.append(i.next().toString()); |
|
|
|
if (i.hasNext()) |
|
|
|
buf.append(delim); |
|
|
|
} |
|
|
|