MCPcopy Index your code
hub / github.com/antlr/codebuff / difference

Method difference

output/java_guava/1.4.19/Maps.java:461–469  ·  view source on GitHub ↗

Computes the difference between two maps. This difference is an immutable snapshot of the state of the maps at the time this method is called. It will never change, even if the maps change at a later time. Since this method uses HashMap instances internally, the keys of the supplied maps

(Map<? extends K, ? extends V> left, Map<? extends K, ? extends V> right)

Source from the content-addressed store, hash-verified

459 */
460
461 @SuppressWarnings("unchecked")
462 public static <K, V> MapDifference<K, V> difference(Map<? extends K, ? extends V> left, Map<? extends K, ? extends V> right) {
463 if (left instanceof SortedMap) {
464 SortedMap<K, ? extends V> sortedLeft = (SortedMap<K, ? extends V>) left;
465 SortedMapDifference<K, V> result = difference(sortedLeft, right);
466 return result;
467 }
468 return difference(left, right, Equivalence.equals());
469 }
470
471 /**
472 * Computes the difference between two maps. This difference is an immutable

Callers

nothing calls this directly

Calls 8

equalsMethod · 0.95
checkNotNullMethod · 0.95
newLinkedHashMapMethod · 0.95
doDifferenceMethod · 0.95
orNaturalOrderMethod · 0.95
newTreeMapMethod · 0.95
comparatorMethod · 0.65
putAllMethod · 0.65

Tested by

no test coverage detected