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)
| 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 |
nothing calls this directly
no test coverage detected