List of utility methods to do Collection Split
void | splitToCollection(Collection split To Collection String[] splitValues = valueString.split(","); for (String value : splitValues) { value = value.trim(); if (!value.isEmpty()) { collection.add(value); |
Collection | splitToCollection(String list, String separator, Collection Split the given String on a separator and add the (trimmed) results to a given Collection String[] parts = list.split(separator); for (String s : parts) { if (!s.equals("")) { dest.add(s.trim()); return dest; |
void | splitToCollection(String str, String sep, Collection Add the trimmed elements of a String str seperated by some seperator sep to collection c if (!str.equals("")) { for (String s : str.split(sep)) { c.add(s.trim()); |