src/org/ohmage/util/StringUtils.java
public static String collectionToStringList(Collection<?> list, String delimiter) {
		boolean firstPass = true;
		StringBuilder resultBuilder = new StringBuilder();
		
		for(Object item : list) {
			if(firstPass) {
				firstPass = false;
			}
			else {
				resultBuilder.append(delimiter);
			}
			
			resultBuilder.append(item.toString());
		}
		
		return resultBuilder.toString();
	}
/**
	 * Takes a collection of objects and converts them to a list where each 
	 * item is converted to a string by its toString() method.
	 * 
	 * @param list The collection of items.
	 * 
	 * @param delimiter The delimiter to use between each item.
	 * 
	 * @return A String representing all of the list items in a delimited list.
	 * 		   This will never return null.
	 */
Takes a collection of objects and converts them to a list where each
item is converted to a string by its toString() method.

@param list The collection of items.

@param delimiter The delimiter to use between each item.

@return A String representing all of the list items in a delimited list.
This will never return null.
Takes a collection of objects and converts them to a list where each item is converted to a string by its toString () method . @param list The collection of items . @param delimiter The delimiter to use between each item . @return A String representing all of the list items in a delimited list . This will never return null .
public static String collectionToStringList(Collection<?> list, String delimiter) {
		boolean firstPass = true;
		StringBuilder resultBuilder = new StringBuilder();
		for(Object item : list) {
			if(firstPass) {
				firstPass = false;
			}
			else {
				resultBuilder.append(delimiter);
			}
			resultBuilder.append(item.toString());
		}
		return resultBuilder.toString();
	}
public static String collectionToStringList ( Collection < ? > list , String delimiter ) { boolean firstPass = true ; StringBuilder resultBuilder = new StringBuilder ( ) ; for ( Object item : list ) { if ( firstPass ) { firstPass = false ; } else { resultBuilder . append ( delimiter ) ; } resultBuilder . append ( item . toString ( ) ) ; } return resultBuilder . toString ( ) ; }
Takes a collection of objects and converts them to a list where each
 item is converted to a string by its toString() method.
Takes a collection of objects and converts them to a list where each item is converted to a string by its toString () method .