ModificationTracker (@NotNull Predicate<? super Language> condition) { return () -> { long result = myAllLanguagesTracker.getModificationCount(); for (Language l : myLanguageTrackers.keySet()) { if (!condition.test(l)) continue; result += myLanguageTrackers.get(l).getModificationCount(); } return result; }; }