List of utility methods to do List to String
ArrayList | toStringClassList(List> list) to String Class List ArrayList<String> toRet = new ArrayList<String>(); for (Object o : list) toRet.add(o.getClass().getSimpleName()); return toRet; |
String | toStringDelimited(final Iterable> list, final String delimiter) Performs a toString on each element given iterable with a given delimiter between elements. if (list == null) { return "null"; final StringBuffer result = new StringBuffer(); final Iterator<?> iterator = list.iterator(); if (iterator.hasNext()) { result.append(iterator.next()); while (iterator.hasNext()) { result.append(delimiter); result.append(iterator.next()); return result.toString(); |
Integer | toStringItem(List to String Item if (itemMapList != null && itemMapList.size() > 0) { Iterator<Map<String, Object>> iterator = itemMapList.iterator(); while (iterator.hasNext()) { Map<String, Object> next = iterator.next(); boolean containsValue = next.containsValue(subjectName); if (containsValue) { return Integer.parseInt(next.get("itemID") + ""); return 0; |
String | toStringList(Collection to String List if (strings != null) { final StringBuilder sb = new StringBuilder(); for (String string : strings) { sb.append(separator); sb.append(string); if (sb.length() > 0) { sb.delete(0, separator.length()); ... |
List | toStringList(final double[] array) to String List List<String> list = new ArrayList<String>(array.length); for (int i = 0; i < array.length; i++) { list.add(String.valueOf(array[i])); return list; |
List | toStringList(final E[] array) to String List List<String> list = new ArrayList<String>(array.length); for (int i = 0; i < array.length; i++) { list.add(array[i].toString()); return list; |
List | toStringList(final List Converts a List of objects to a List of String s. List<String> ret = new ArrayList<String>(); for (Object o : list) { ret.add(o.toString()); return ret; |
List | toStringList(final String tags) to String List return tags != null ? Arrays.asList(tags.split("\\s*,\\s*")) : null; |
String | toStringList(HashSet V) to String List if ((V == null) || (V.size() == 0)) { return ""; final StringBuffer s = new StringBuffer(""); for (final Iterator i = V.iterator(); i.hasNext();) s.append(", " + i.next().toString()); if (s.length() == 0) return ""; ... |
List | toStringList(List list) to String List List<String> stringList = new ArrayList<>(); if (list != null) { for (Object object : list) stringList.add(object != null ? object.toString() : null); return stringList; |