List<HighlightInfo> (@NotNull Project project, @NotNull List<? extends HighlightInfo> highlightInfos) { List<HighlightInfo> result = new ArrayList<>(highlightInfos.size()); for (HighlightInfo info : highlightInfos) { if (accept(project, info)) { result.add(info); } } return result; }