/** * Convenience method to return a Collection as a delimited (e.g. CSV) * String. E.g. useful for <code>toString()</code> implementations. * @param coll the Collection to display * @param delim the delimiter to use (probably a ",") * @return the delimited String */ public static String collectionToDelimitedString(Collection<?> coll, String delim) { return collectionToDelimitedString(coll, delim, "", ""); }
/** * Convenience method to return a Collection as a CSV String. * E.g. useful for <code>toString()</code> implementations. * @param coll the Collection to display * @return the delimited String */ public static String collectionToCommaDelimitedString(Collection<?> coll) { return collectionToDelimitedString(coll, ","); }
public String toString() { StringBuilder buffer = new StringBuilder(); for (Set<String> part : this.getParts()) { if (buffer.length() > 0) { buffer.append(PART_DIVIDER_TOKEN); } buffer.append(Strings.collectionToDelimitedString(part, SUBPART_DIVIDER_TOKEN)); } return buffer.toString(); }
public String toString() { StringBuilder buffer = new StringBuilder(); for (Set<String> part : this.getParts()) { if (buffer.length() > 0) { buffer.append(PART_DIVIDER_TOKEN); } buffer.append(Strings.collectionToDelimitedString(part, SUBPART_DIVIDER_TOKEN)); } return buffer.toString(); }
sb.append(" "); sb.append("order by ").append(Strings.collectionToDelimitedString(orderEntries, ", ")); sb.append(" "); sb.append("expand ").append(Strings.collectionToDelimitedString(expandable.getExpansions(), ", "));
sb.append(" "); sb.append("order by ").append(Strings.collectionToDelimitedString(orderEntries, ", ")); sb.append(" "); sb.append("expand ").append(Strings.collectionToDelimitedString(expandable.getExpansions(), ", "));
return prefix + collectionToDelimitedString(pathElements, FOLDER_SEPARATOR);