Set<GrVariable> (@NotNull List<? extends GrField> fields, boolean isStatic) { Set<GrVariable> result = new HashSet<>(); for (GrField field : fields) { if (field.hasModifierProperty(PsiModifier.STATIC) == isStatic) { result.add(field); } } return result; }