LinkedHashSet<PsiEnumConstant> (@NotNull PsiClass selectorClass, @NotNull List<PsiEnumConstant> enumElements) { LinkedHashSet<PsiEnumConstant> missingConstants = StreamEx.of(selectorClass.getFields()).select(PsiEnumConstant.class).toCollection(LinkedHashSet::new); if (!enumElements.isEmpty()) { enumElements.forEach(missingConstants::remove); } return missingConstants; }