File src/de/jandankert/prefs/Utils.java

Last commit: Fri Jan 6 00:04:37 2012 +0100	Jan Dankert	let's start...
1 package de.jandankert.prefs; 2 3 import java.util.Collection; 4 import java.util.Iterator; 5 6 public final class Utils 7 { 8 9 public static <T> String join(final Collection<T> objs, final String delimiter) 10 { 11 if (objs == null || objs.isEmpty()) 12 return ""; 13 Iterator<T> iter = objs.iterator(); 14 StringBuffer buffer = new StringBuffer(iter.next().toString()); 15 while (iter.hasNext()) 16 buffer.append(delimiter).append(iter.next().toString()); 17 return buffer.toString(); 18 } 19 20 }
Download src/de/jandankert/prefs/Utils.java
History Fri, 6 Jan 2012 00:04:37 +0100 Jan Dankert let's start...