List of utility methods to do Collection to String
List | convertEnumsToString(Collection extends Enum>> enums) Converts the given enum values to their string representation. List<String> result = new ArrayList<String>(enums.size()); for (Enum<?> value : enums) { result.add(value.name()); return result; |
String | convertListToString(Collection convert List To String String stringOfList = ""; if (list != null) { StringBuffer sb = new StringBuffer(); boolean firstTime = true; for (T item : list) { if (firstTime) { sb.append(item); firstTime = false; ... |
String | convertString(Collection convert String StringBuilder builder = new StringBuilder(); for (String string : strings) builder.append(string).append(","); return builder.toString(); |
String | convertStringCollectionToString(Collection convert String Collection To String StringBuilder sb = new StringBuilder(""); for (String s : collectionString) { if (sb.length() != 0) { sb.append(delemeter); sb.append(s); return sb.toString(); ... |
String | convertStringCollectionToString(Collection convert String Collection To String if (value.size() == 0) { return ""; StringBuilder sb = new StringBuilder(); for (String v : value) { sb.append(v); sb.append(separator); sb.setLength(sb.length() - separator.length()); return sb.toString(); |
String | convertToString(Collection> ss) convert To String StringBuilder sb = new StringBuilder(); for (Object i : ss) { sb.append(i).append(','); return sb.toString(); |
String | convertToString(final Collection> objects) convert To String String str = "["; boolean isNotFirst = false; for (Object object : objects) { if (isNotFirst) { str += ", "; str += object; isNotFirst = true; ... |
String | listToString(Collection aList, String aDelimiter, boolean quoteEntries) Create a String from the given list, where the elements are delimited with the supplied delimiter return listToString(aList, aDelimiter, quoteEntries, '"'); |
String | listToString(Collection extends Object> collection) list To String StringBuilder out = new StringBuilder(); out.append("["); for (Object o : collection) { out.append(String.format("%s ", o)); out.append("]"); return out.toString(); |
String | listToString(Collection> l, String delim) list To String StringBuilder s = new StringBuilder(); if (l.size() == 0) { return ""; for (Object o : l) { s.append(o).append(delim); s.delete(s.length() - delim.length(), s.length()); ... |