public static ThreeState hasCompatibleParameter(PsiMethod method, int argIndex, List<? extends PsiClass> samClasses) {
    PsiParameter[] parameters = method.getParameterList().getParameters();
    int paramIndex = method.isVarArgs() ? Math.min(argIndex, parameters.length - 1) : argIndex;
    return paramIndex < parameters.length ? canPassFunctionalExpression(samClasses, parameters[paramIndex].getType(), method) : ThreeState.NO;
  }
public static ThreeState hasCompatibleParameter(PsiMethod method, int argIndex, List<? extends PsiClass> samClasses)