void (ChangeListsIndexes newIndexes, Set<? super BaseRevision> toRemove, Set<? super BaseRevision> toAdd, Set<? super BeforeAfter<BaseRevision>> toModify) { Map<FilePath, Data> oldMap = myMap; Map<FilePath, Data> newMap = newIndexes.myMap; for (Map.Entry<FilePath, Data> entry : oldMap.entrySet()) { FilePath s = entry.getKey(); Data oldData = entry.getValue(); Data newData = newMap.get(s); if (newData != null) { if (!oldData.sameRevisions(newData)) { toModify.add(new BeforeAfter<>(createBaseRevision(s, oldData), createBaseRevision(s, newData))); } } else { toRemove.add(createBaseRevision(s, oldData)); } } for (Map.Entry<FilePath, Data> entry : newMap.entrySet()) { FilePath s = entry.getKey(); Data newData = entry.getValue(); if (!oldMap.containsKey(s)) { toAdd.add(createBaseRevision(s, newData)); } } }