/** * Joins together some number of elements to form a comma separated list. */ public static String join(List elements) { return InternalCommonsUtils.join(elements); }
/** * Joins together some number of elements to form a comma separated list. */ public static String join(List elements) { return InternalCommonsUtils.join(elements, ", "); }
/** * Joins together some number of elements to form a comma separated list. */ public static String join(List elements) { return InternalCommonsUtils.join(elements); }
/** * Joins together some number of elements. If a value in the list is the empty string, it is replaced with the * string "(blank)". * * @param elements * objects to be joined together * @param separator * used between elements when joining */ public static String join(List elements, String separator) { return InternalCommonsUtils.join(elements, separator); }
/** * Joins together some number of elements. If a value in the list is the empty string, it is replaced with the * string "(blank)". * * @param elements * objects to be joined together * @param separator * used between elements when joining */ public static String join(List elements, String separator) { return InternalCommonsUtils.join(elements, separator); }
@Override public String toString() { return String.format("AvailableValues[%s: %s]", valueType, InternalCommonsUtils.join(values)); }
/** * Creates a sorted copy of the provided elements, then turns that into a comma separated list. * * @return the elements converted to strings, sorted, joined with comma ... or "(none)" if the elements are null or * empty */ public static String joinSorted(Collection elements) { if (elements == null || elements.isEmpty()) return "(none)"; List<String> list = CollectionFactory.newList(); for (Object o : elements) list.add(String.valueOf(o)); Collections.sort(list); return join(list); }