List of utility methods to do List Merge
String | merge(List merge StringBuilder builder = new StringBuilder(); for (String s : text) { builder.append(s); return builder.toString(); |
ArrayList | merge(List merge if (a == null && b == null) return null; else if (a == null) return new ArrayList<>(b); else if (b == null) return new ArrayList<>(a); ArrayList<T> al = new ArrayList<>(a.size() + b.size()); al.addAll(a); ... |
void | merge(List merge b.addAll(a); b.sort(comp); |
void | merge(List merge Collections.sort(list); |
void | merge(List Merges two consecutive sorted lists in place. int n = list.size(); if (0 < split && split < n) { merge(list, 0, split, n - 1, (int) Math.sqrt(split), 0); |
List | merge(List merge if (list != null) { if (items != null) { for (T item : items) { if (!list.contains(item)) { list.add(item); } else { return items; return list; |
String | merge(String[] list) merge return merge(Arrays.asList(list));
|
List | merge2ListsWithoutDup(List merge Lists Without Dup list1.removeAll(list2);
list1.addAll(list2);
return list1;
|
void | mergeBandY(List Auxilliary method required for merging two consecutive sorted lists in place. while (z < y && y <= yn) { int j = z + indexOfMin(A.subList(z, y)); if (A.get(j).compareTo(A.get(y)) <= 0) { Collections.swap(A, z, j); } else { Collections.swap(A, z, y); y++; z++; if (z < y) { Collections.sort(A.subList(z, yn + 1)); |
byte[] | mergeBytes(List merge Bytes int len = 0; for (byte[] aPackage : packages) { len += aPackage.length; byte[] result = new byte[len]; int pos = 0; for (byte[] aPackage : packages) { for (int j = 0; j < aPackage.length; j++) { ... |