class KiePMMLRegressionTableRegressionFactory {

    static Map<String, MethodDeclaration> addPredictorTerms(final List<PredictorTerm> predictorTerms,
                                                                    final ClassOrInterfaceDeclaration tableTemplate) {
        predictorsArity.set(0);
        return predictorTerms.stream()
                .map(predictorTerm -> {
                    int arity = predictorsArity.addAndGet(1);
                    return new AbstractMap.SimpleEntry<>(predictorTerm.getName() != null ?
                                                                 predictorTerm.getName().getValue() :
                                                                 "predictorTerm" + arity,
                                                         addPredictorTerm(predictorTerm, tableTemplate, arity));
                })
                .collect(Collectors.toMap(AbstractMap.SimpleEntry::getKey,
                                          AbstractMap.SimpleEntry::getValue));
    }

    private  KiePMMLRegressionTableRegressionFactory();

}