Intersection (@NotNull List<LocalChangeList> changeLists, @NotNull Condition<Change> filter) { Intersection result = new Intersection(); for (LocalChangeList changeList : changeLists) { for (Change change : changeList.getChanges()) { if (filter.value(change)) { result.add(changeList, change); } } } return result; }