class KiePMMLRegressionTableClassificationFactory {

    static void populateIsBinaryMethod(final OpType opType, int size,
                                               final ClassOrInterfaceDeclaration tableTemplate) {
        try {
            final MethodDeclaration methodDeclaration = tableTemplate.getMethodsByName("isBinary").get(0);
            boolean toReturn = Objects.equals(OpType.CATEGORICAL, opType) && size == 2;
            BlockStmt blockStmt = new BlockStmt();
            blockStmt.addStatement(new ReturnStmt(new BooleanLiteralExpr(toReturn)));
            methodDeclaration.setBody(blockStmt);
        } catch (Exception e) {
            throw new KiePMMLInternalException(e.getMessage());
        }
    }

    private  KiePMMLRegressionTableClassificationFactory();

}