void (@NotNull ChangeListWorker.ListData list, @NotNull List<? super Change> removedChanges, @NotNull List<? super Change> addedChanges) { ObjectOpenHashSet<Change> changesBeforeUpdate = myChangesBeforeUpdateMap.get(list.id); Set<Change> listChanges = new HashSet<>(myWorker.getChangesIn(list)); for (Change newChange : listChanges) { Change oldChange = findOldChange(changesBeforeUpdate, newChange); if (oldChange == null) { addedChanges.add(newChange); } } removedChanges.addAll(changesBeforeUpdate); removedChanges.removeAll(listChanges); }