/** * Creates a comma-separated String from the given List of String objects. */ public static String commaSeparatedString(List list) { if (list == null) { return null; } StringBuffer buffer = new StringBuffer(); for (int index = 0; index < list.size(); index++) { if (index > 0) { buffer.append(','); } buffer.append(quotedString((String)list.get(index))); } return buffer.toString(); }
/** * Creates a comma-separated String from the given List of String objects. */ public static String commaSeparatedString(List list, boolean quoteStrings) { if (list == null) { return null; } StringBuffer buffer = new StringBuffer(); for (int index = 0; index < list.size(); index++) { if (index > 0) { buffer.append(','); } String string = (String)list.get(index); if (quoteStrings) { string = quotedString(string); } buffer.append(string); } return buffer.toString(); }
/** * Creates a comma-separated String from the given List of String objects. */ public static String commaSeparatedString(List list, boolean quoteStrings) { if (list == null) { return null; } StringBuffer buffer = new StringBuffer(); for (int index = 0; index < list.size(); index++) { if (index > 0) { buffer.append(','); } String string = (String)list.get(index); if (quoteStrings) { string = quotedString(string); } buffer.append(string); } return buffer.toString(); }
/** * Creates a comma-separated String from the given List of String objects. */ public static String commaSeparatedString(List list, boolean quoteStrings) { if (list == null) { return null; } StringBuffer buffer = new StringBuffer(); for (int index = 0; index < list.size(); index++) { if (index > 0) { buffer.append(','); } String string = (String)list.get(index); if (quoteStrings) { string = quotedString(string); } buffer.append(string); } return buffer.toString(); }