List of utility methods to do List Merge
String | mergeString(List merge String StringBuffer sBuffer = new StringBuffer(); for (String s : strs) { sBuffer.append(s); return sBuffer.toString(); |
String | mergeTimeStrings(List merge Time Strings StringBuilder sb = new StringBuilder(); for (int i = strs.size() - 1; i >= 0; i--) { sb.append(strs.get(i)); sb.append(' '); int lastChar = sb.length() - 1; if (lastChar >= 0) { sb.deleteCharAt(lastChar); ... |
void | mergeTo(List merge To if ((target == null) || (source == null)) { return; target.addAll(source); |
List | mergeToList(Object src, Object... args) merge To List List valList = new ArrayList(); add(valList, src); for (Object arg : args) { add(valList, arg); return valList; |
List | mergeUniqElems(List merge Uniq Elems if (dest == null) { return src; if (src == null) { return dest; int pos = 0; while (pos < dest.size()) { ... |
void | safetyMergeCollection(List src, List target) Safety add element included in source collection to target collection if target has already had element that is included in source collection, it doesn't add element to target for (Iterator it = src.iterator(); it.hasNext();) { Object data = it.next(); if (!target.contains(data)) { target.add(data); |