List of utility methods to do List Merge
List | mergeCollectionsToList(Collection merge Collections To List List<T> mergedList = new ArrayList<T>(countCollectionsSize(cols)); for (Collection<T> oneList : cols) { if (oneList == null) continue; mergedList.addAll(oneList); return mergedList; |
List | mergeCoords(List This will merge the coordinates of the given coordinate system. if (x.size() != y.size()) throw new IllegalArgumentException( "Sample sizes must be the same for each data applyTransformToDestination."); List<Double> ret = new ArrayList<>(); for (int i = 0; i < x.size(); i++) { ret.add(x.get(i)); ret.add(y.get(i)); return ret; |
void | mergeData(List lstMain, List lstData, List lstKey) Merge the list of data to main list by list of key if (lstMain == null || lstData == null || lstData.size() == 0 || lstKey == null || lstKey.size() == 0) { return; for (int index1 = 0, n = lstMain.size(); index1 < n; index1++) { Map mapMain = (Map) lstMain.get(index1); Map keyValue = new HashMap(); for (int index2 = 0, m = lstKey.size(); index2 < m; index2++) { Object key = lstKey.get(index2); ... |
List | mergedView(final List Returns a new unmodifiable view that is the merging of two lists List<T> merged = new AbstractList<T>() { @Override public T get(int index) { if (index < left.size()) return left.get(index); else if (index - left.size() < right.size()) return right.get(index - left.size()); else ... |
String | mergeErrorMsgList(List merge Error Msg List StringBuilder errorMsg = new StringBuilder(); for (String msg : errorMsgs) { errorMsg.append(msg); errorMsg.append(", "); return errorMsg.substring(0, errorMsg.length() - 2); |
Exception | mergeException(List merge Exception Exception exception = new Exception(); return exception; |
String[] | mergeExcludedFieldLists(String[] superClassExcludes, String[] localClassExcludes) Utility method to merge two list of excluded fields. List<String> localExcludes = Arrays.asList(localClassExcludes); List<String> superExcludes = Arrays.asList(superClassExcludes); List<String> mergedExcludes = new ArrayList<String>(localExcludes); mergedExcludes.addAll(superExcludes); return mergedExcludes.toArray(new String[] {}); |
void | mergeFilterLists(List merge Filter Lists for (String f : parentFilters) { if (!childFilters.contains(f)) { childFilters.add(f); |
Collection
| mergeHierarchicalAndFlatDimensions( Collection
Hierarchical: {1, 0, 0} {1, 1, 0} {1, 1, 1} Flat: {1, 0} {1, 1} {0, 0} {0, 1} Result: {1, 0, 0, 1, 0} {1, 0, 0, 1, 1} {1, 0, 0, 0, 0} {1, 0, 0, 0, 1} {1, 1, 0, 1, 0} {1, 1, 0, 1, 1} {1, 1, 0, 0, 0} {1, 1, 0, 0, 1} {1, 1, 1, 1, 0} {1, 1, 1, 1, 1} {1, 1, 1, 0, 0} {1, 1, 1, 0, 1} if (hierachicalDimensions.size() == 0) { return flatDimensions; if (flatDimensions.size() == 0) { return hierachicalDimensions; Collection<List<Boolean>> result = new ArrayList<>(hierachicalDimensions.size() * flatDimensions.size()); hierachicalDimensions.forEach(hierarchicalCombination -> { ... |
List | mergeIdAndStrings(Long accountId, Long workspaceId, List merge Id And Strings List<String> ps = new ArrayList<>(); for (String str : strs) { ps.add(mergeIdAndString(accountId, workspaceId, str)); return ps; |