List of utility methods to do String to List
ArrayList | strToAList(String strTokenize) Takes a string and returns the array list for that string. return strToAList(strTokenize, true);
|
List | strToList(String str, String regex) str To List List<String> list = new ArrayList<String>(); if (str.length() == 0 && "".equals(str)) { return list; } else if (str.length() == 1) { list.add(str); return list; String temp[] = str.split(regex); ... |
List | strToList(String str, String separator) str To List String[] strArr = str.split(separator); List<String> strList = new ArrayList<String>(); for (String tmpStr : strArr) { strList.add(tmpStr); return strList; |
List | strToList(String str, String split) str To List String[] strs = {}; if (str != null && !"".equals(str)) { strs = str.split(split); List<String> tokenList = new ArrayList<String>(); for (int i = 0; i < strs.length; i++) { String temp = strs[i]; if (temp != null) { ... |
List | strToList(String value) str To List List<Object> result = new ArrayList<Object>(); String[] strs = value.split(","); for (String s : strs) { result.add(s); return result; |
ArrayList | toList(String list) to List ArrayList l = new ArrayList(); String aux; aux = list; while (aux.indexOf(',') > 0) { l.add(aux.substring(0, aux.indexOf(',')).trim()); aux = aux.substring(aux.indexOf(',') + 1); if (aux.trim().compareTo("") != 0) { ... |
List | toList(String s) to List List<String> list = new ArrayList<String>(); if (s != null) { for (String x : s.split(",")) { x = x.trim(); list.add(x); return list; ... |
List | toList(String s, String delim) to List if (isNull(s)) return new ArrayList(0); return Arrays.asList(s.split(delim)); |
List | toList(String s, String delimiter) to List if (s == null || s.length() == 0) return Collections.emptyList(); final List<String> result = new ArrayList<String>(); final StringTokenizer tokenizer = new StringTokenizer(s, delimiter); while (tokenizer.hasMoreTokens()) result.add(tokenizer.nextToken()); return result; |
List | toList(String str) to List return toList(str, DEFAULT_SEPARATOR, DEFAULT_ESCAPE_CHAR);
|