DuplicatesProfile (List<? extends DuplicatesProfile> profiles, @NotNull Language language) { for (DuplicatesProfile profile : profiles) { if (profile.isMyLanguage(language)) { return profile; } } return null; }