List of utility methods to do List Difference
List | getLeftDiff(List get Left Diff if (isEmpty(list2)) { return list1; List<T> list = new ArrayList<T>(); if (isNotEmpty(list1)) { for (T o : list1) { if (!list2.contains(o)) { list.add(o); ... |
String | getListsDiffFormatted(List Get formatted difference between list0 and list1 StringBuffer sb = new StringBuffer(""); if (list0 == null && list1 == null) { sb.append("<null> == <null>"); } else if (list0 == null) { sb.append("<null> != <not null>"); } else if (list1 == null) { sb.append("<null> != <not null>"); } else { ... |
double | getScoreSeriesByMinMaxAndDiff(List get Score Series By Min Max And Diff Integer first = percentClaimedHistory.get(0); Integer current = percentClaimedHistory.get(percentClaimedHistory.size() - 1); int diff = current.intValue() - first.intValue(); double score = diff * Math.pow(retrieveMinimumNotZeroDifference(percentClaimedHistory), -1); return score; |
boolean | hasRemoval(List Check if the list of differences contains the removal of a key, the key is a path part1.part2.part3 final String pattern = String.format("-%s:", path); return lookForPattern(differences, pattern); |
int | maxDiffBetweenCompressedWayNodes(final List Computes the maximum absolute difference in the list of way node offsets. int maxDiff = 0; for (int diff : wayNodeOffsets.subList(2, wayNodeOffsets.size())) { diff = Math.abs(diff); if (diff > maxDiff) maxDiff = diff; return maxDiff; |
int | retrieveMinimumNotZeroDifference(List retrieve Minimum Not Zero Difference int minimumDifference = 100; for (int i = 0; i < percentClaimedHistory.size(); i++) { Integer outerPercent = percentClaimedHistory.get(i); for (int j = 0; j < percentClaimedHistory.size(); j++) { Integer innerPercent = percentClaimedHistory.get(j); int currentDifference = Math.abs(outerPercent - innerPercent); if (currentDifference != 0 && currentDifference < minimumDifference) { minimumDifference = currentDifference; ... |