List<Language> (@NotNull Predicate<? super Language> filter) { LanguageParserDefinitions.INSTANCE.ensureValuesLoaded(); List<Language> result = new ArrayList<>(); for (Language language : Language.getRegisteredLanguages()) { if (filter.test(language)) { result.add(language); } } result.sort(LANGUAGE_COMPARATOR); return result; }