MapLoopCondition (@NotNull PsiParameter iterParam, boolean isEntrySet, @Nullable PsiExpression qualifier) { PsiReferenceExpression ref = ObjectUtils.tryCast(qualifier, PsiReferenceExpression.class); if (ref == null) return null; PsiVariable map = ObjectUtils.tryCast(ref.resolve(), PsiVariable.class); if (map == null) return null; return new MapLoopCondition(iterParam, isEntrySet, ref, map); }