src/org/ohmage/util/StringUtils.java
public static String mapToStringList(Map<?, ?> map, String pairDelimiter, String listDelimiter) {
		boolean firstPass = true;
		StringBuilder resultBuilder = new StringBuilder();
		
		for(Object key : map.keySet()) {
			Object value = map.get(key);
			
			if(value == null) {
				throw new IllegalArgumentException("The map cannot contain null values.");
			}
			
			if(firstPass) {
				firstPass = false;
			}
			else {
				resultBuilder.append(listDelimiter);
			}
			
			resultBuilder.append(key.toString()).append(pairDelimiter).append(value.toString());
		}
		
		return resultBuilder.toString();
	}
/**
	 * Takes a map of objects and converts their keys and values to a list 
	 * where each key and value are converted to a string by their toString()
	 * methods, the pairs are joined with a 'pairDelimiter' between them and
	 * the pairs are joined with other pairs with a 'listDelimiter' between
	 * them.<br />
	 * <br />
	 * The keys and value cannot be null or an exception will be thrown.
	 * 
	 * @param map The map of items.
	 * 
	 * @param pairDelimiter The string to be placed between the key and value
	 * 						while generating the list.
	 * 
	 * @param listDelimiter The string to be placed between the already joined
	 * 						pairs while generating the list.
	 * 
	 * @return A String representing all of the pairs and list items together.
	 * 
	 * @throws IllegalArgumentException Thrown if any of the keys and/or values
	 * 									are null.
	 */
Takes a map of objects and converts their keys and values to a list
where each key and value are converted to a string by their toString()
methods, the pairs are joined with a 'pairDelimiter' between them and
the pairs are joined with other pairs with a 'listDelimiter' between
them.

The keys and value cannot be null or an exception will be thrown.

@param map The map of items.

@param pairDelimiter The string to be placed between the key and value
while generating the list.

@param listDelimiter The string to be placed between the already joined
pairs while generating the list.

@return A String representing all of the pairs and list items together.

@throws IllegalArgumentException Thrown if any of the keys and/or values
are null.
Takes a map of objects and converts their keys and values to a list where each key and value are converted to a string by their toString () methods the pairs are joined with a ' pairDelimiter ' between them and the pairs are joined with other pairs with a ' listDelimiter ' between them . The keys and value cannot be null or an exception will be thrown . @param map The map of items . @param pairDelimiter The string to be placed between the key and value while generating the list . @param listDelimiter The string to be placed between the already joined pairs while generating the list . @return A String representing all of the pairs and list items together . @throws IllegalArgumentException Thrown if any of the keys and / or values are null .
public static String mapToStringList(Map<?, ?> map, String pairDelimiter, String listDelimiter) {
		boolean firstPass = true;
		StringBuilder resultBuilder = new StringBuilder();
		for(Object key : map.keySet()) {
			Object value = map.get(key);
			if(value == null) {
				throw new IllegalArgumentException("The map cannot contain null values.");
			}
			if(firstPass) {
				firstPass = false;
			}
			else {
				resultBuilder.append(listDelimiter);
			}
			resultBuilder.append(key.toString()).append(pairDelimiter).append(value.toString());
		}
		return resultBuilder.toString();
	}
public static String mapToStringList ( Map < ? , ? > map , String pairDelimiter , String listDelimiter ) { boolean firstPass = true ; StringBuilder resultBuilder = new StringBuilder ( ) ; for ( Object key : map . keySet ( ) ) { Object value = map . get ( key ) ; if ( value == null ) { throw new IllegalArgumentException ( "The map cannot contain null values." ) ; } if ( firstPass ) { firstPass = false ; } else { resultBuilder . append ( listDelimiter ) ; } resultBuilder . append ( key . toString ( ) ) . append ( pairDelimiter ) . append ( value . toString ( ) ) ; } return resultBuilder . toString ( ) ; }
Takes a map of objects and converts their keys and values to a list
 where each key and value are converted to a string by their toString()
 methods, the pairs are joined with a 'pairDelimiter' between them and
 the pairs are joined with other pairs with a 'listDelimiter' between
 them.<br />
 <br />
 The keys and value cannot be null or an exception will be thrown.
Takes a map of objects and converts their keys and values to a list where each key and value are converted to a string by their toString () methods the pairs are joined with a ' pairDelimiter ' between them and the pairs are joined with other pairs with a ' listDelimiter ' between them . <br / > <br / > The keys and value cannot be null or an exception will be thrown .