Collection<TextRange> (@NotNull PsiElement startAnchor, @NotNull Set<PsiElement> unreachable) { Set<TextRange> result = new HashSet<>(); for (PsiElement element : unreachable) { ContainerUtil.addIfNotNull(result, createRange(startAnchor, element, unreachable)); } return result; }