List of utility methods to do Collection Combine
String | combineNames(Collection combine Names if ((items == null) || (items.isEmpty())) { return ""; if (items.size() == 1) { Object item = items.iterator().next(); return item == null ? "" : item.toString(); StringBuilder rval = new StringBuilder(); ... |
String | combineProblemMessages(final Collection combine Problem Messages final StringBuilder builder = new StringBuilder("The following problems were found:\n\n"); for (final String problem : problems) { builder.append(problem).append("\n"); return builder.toString(); |
String | combineString(Collection combine String if ((null == vec) || (null == sep)) { return null; StringBuilder sb = new StringBuilder(); boolean first = true; for (String part : vec) { if (first) { first = false; ... |
String | combineValues(Collection One of a pair of methods (the other is splitValues) that is used to combine several un-encoded values into a single delimited, encoded value for placement into a hidden field. if (values == null || values.size() == 0) { return ""; } else { StringBuilder builder = new StringBuilder(values.size() * 30); for (String value : values) { builder.append(value).append(FIELD_DELIMITER_STRING); return encode(builder.toString()); ... |