List<Object> (@NotNull Map<Object, Integer> removed, @NotNull Map<Object, Integer> inserted) { if (removed.isEmpty() || inserted.isEmpty()) return emptyList(); int countOne = getIntersectionCount(removed, inserted.keySet()); int countTwo = getIntersectionCount(inserted, removed.keySet()); if (countOne > countTwo) return getIntersection(removed, inserted.keySet()); if (countTwo > 0) return getIntersection(inserted, removed.keySet()); return emptyList(); }