List of utility methods to do List Merge
void | mergeLists(List merges the entries from newItems into the baseList this implementation does adopt items from the baseList to the newItems in the same order - without creating a new list - without touching existing entries (which should not be removed) This implementation only works if .equals() of the type T is implemented in a proper way for (int i = baseList.size() - 1; i >= 0; i--) { T entry = baseList.get(i); if (!newItems.contains(entry)) { baseList.remove(entry); for (int i = 0; i < newItems.size(); i++) { T entry = newItems.get(i); ... |
List | mergeLists(List merge Lists if (copyTo == null) { return copyFrom; } else if (copyFrom != null && !copyFrom.isEmpty()) { for (T t : copyTo) { if (!copyFrom.contains(t)) { copyFrom.add(t); return copyFrom; return copyTo; |
void | mergeLists(List merge Lists for (T t : inserts) { if (!dest.contains(t)) { dest.add(t); |
List | mergeLists(List merge Lists List<T> returnList = new ArrayList<T>(listA); returnList.addAll(listB); returnList.addAll(listC); return Collections.unmodifiableList(returnList); |
List | mergeLists(Object oldValue, Object newValue, Object newValue2) Returns a list which is 3 way merge. if (!(oldValue instanceof List) || !(newValue instanceof List) || !(newValue2 instanceof List)) throw new IllegalArgumentException("one of the parameters is not a list."); List oldList = (List) oldValue; List newList = (List) newValue; List newList2 = (List) newValue2; List resultList = new ArrayList(); resultList.addAll(newList2); List removedInNewList = new ArrayList(); ... |
void | mergeOperations(List Only smallest disjoint sets are retained if (list1.size() == 0) { list1.add(ops2); return; if (ops2 == null) { return; Iterator<Set<T>> it = list1.iterator(); ... |
int | mergeOrdered(List Merges elems into base with respect to the sorting order. if (elems.isEmpty()) { return base.size(); if (base.isEmpty()) { base.addAll(elems); return 0; int basePos = 0; ... |
String | mergepath(List mergepath StringBuilder buf = new StringBuilder(); for (int i = 0; i < pieces.size(); i++) { if (i > 0) buf.append(separator); buf.append(pieces.get(i)); return buf.toString(); |
List | mergerList(List merger List List<T> results = new ArrayList<T>(); if (sources != null && !sources.isEmpty()) { results.addAll(sources); if (targets != null && !targets.isEmpty()) { results.addAll(targets); return results; ... |
void | mergeSpeakerList(List merge Speaker List |