List<PsiElement> (ResolveResult @NotNull [] resolveResults) { if (resolveResults.length == 0) return Collections.emptyList(); final int maxRate = getMaxRate(Arrays.asList(resolveResults)); return StreamEx .of(resolveResults) .filter(resolveResult -> getRate(resolveResult) >= maxRate) .map(ResolveResult::getElement) .nonNull() .toList(); }