// Path: src/main/java/com/evolvedbinary/xpath/parser/ast/FilterExpr.java
// public class FilterExpr extends AbstractASTNode implements StepExpr {
//     private final PrimaryExpr primaryExpr;
//     private final PredicateList predicateList;
// 
//     public FilterExpr(final PrimaryExpr primaryExpr, final PredicateList predicateList) {
//         this.primaryExpr = primaryExpr;
//         this.predicateList = predicateList;
//     }
// 
//     @Override
//     protected String describe() {
//         return "FilterExpr(" + primaryExpr + ", " + predicateList + ")";
//     }
// 
//     @Override
//     public boolean equals(final Object obj) {
//         if(obj != null && obj instanceof FilterExpr) {
//             final FilterExpr other = (FilterExpr)obj;
//             return other.primaryExpr.equals(primaryExpr)
//                     && other.predicateList.equals(predicateList);
//         }
// 
//         return false;
//     }
// }
// 
// Path: src/main/java/com/evolvedbinary/xpath/parser/ast/PredicateList.java
// public class PredicateList extends AbstractASTNode {
//     public final static PredicateList EMPTY = new PredicateList(Collections.<Predicate>emptyList());
// 
//     private final List<Predicate> predicates;
// 
//     public PredicateList(final List<Predicate> predicates) {
//         this.predicates = predicates;
//     }
// 
//     public PredicateList(final Predicate... predicates) {
//         this.predicates = Arrays.asList(predicates);
//     }
// 
//     @Override
//     protected String describe() {
//         final StringBuilder builder = new StringBuilder();
//         for(final Predicate predicate : predicates) {
//             if(builder.length() > 0) {
//                 builder.append(", ");
//             }
//             builder.append(predicate.toString());
//         }
//         return "PredicateList(" + builder.toString() + ")";
//     }
// 
//     @Override
//     public boolean equals(final Object obj) {
//         if(obj != null && obj instanceof PredicateList) {
//             return ((PredicateList)obj).predicates.equals(predicates);
//         }
// 
//         return false;
//     }
// }
// 
// Path: src/main/java/com/evolvedbinary/xpath/parser/ast/PrimaryExpr.java
// public abstract class PrimaryExpr extends AbstractASTNode {
// }


import com.evolvedbinary.xpath.parser.ast.FilterExpr;
import com.evolvedbinary.xpath.parser.ast.PredicateList;
import com.evolvedbinary.xpath.parser.ast.PrimaryExpr;
/**
 * XPath 2 Parser
 * A Parser for XPath 2
 * Copyright (C) 2016 Evolved Binary Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
package com.evolvedbinary.xpath.parser.ast.partial;


/**
 * Created by aretter on 11/02/2016.
 */
public class PartialFilterExpr extends AbstractPartialASTNode<FilterExpr, PredicateList> {
    final PrimaryExpr primaryExpr;

    public PartialFilterExpr(final PrimaryExpr primaryExpr) {
        this.primaryExpr = primaryExpr;
    }

    @Override
    protected String describe() {
        return "FilterExpr(" + primaryExpr + ", ?)";
    }

    @Override
// Path: src/main/java/com/evolvedbinary/xpath/parser/ast/FilterExpr.java
// public class FilterExpr extends AbstractASTNode implements StepExpr {
//     private final PrimaryExpr primaryExpr;
//     private final PredicateList predicateList;
// 
//     public FilterExpr(final PrimaryExpr primaryExpr, final PredicateList predicateList) {
//         this.primaryExpr = primaryExpr;
//         this.predicateList = predicateList;
//     }
// 
//     @Override
//     protected String describe() {
//         return "FilterExpr(" + primaryExpr + ", " + predicateList + ")";
//     }
// 
//     @Override
//     public boolean equals(final Object obj) {
//         if(obj != null && obj instanceof FilterExpr) {
//             final FilterExpr other = (FilterExpr)obj;
//             return other.primaryExpr.equals(primaryExpr)
//                     && other.predicateList.equals(predicateList);
//         }
// 
//         return false;
//     }
// }
// 
// Path: src/main/java/com/evolvedbinary/xpath/parser/ast/PredicateList.java
// public class PredicateList extends AbstractASTNode {
//     public final static PredicateList EMPTY = new PredicateList(Collections.<Predicate>emptyList());
// 
//     private final List<Predicate> predicates;
// 
//     public PredicateList(final List<Predicate> predicates) {
//         this.predicates = predicates;
//     }
// 
//     public PredicateList(final Predicate... predicates) {
//         this.predicates = Arrays.asList(predicates);
//     }
// 
//     @Override
//     protected String describe() {
//         final StringBuilder builder = new StringBuilder();
//         for(final Predicate predicate : predicates) {
//             if(builder.length() > 0) {
//                 builder.append(", ");
//             }
//             builder.append(predicate.toString());
//         }
//         return "PredicateList(" + builder.toString() + ")";
//     }
// 
//     @Override
//     public boolean equals(final Object obj) {
//         if(obj != null && obj instanceof PredicateList) {
//             return ((PredicateList)obj).predicates.equals(predicates);
//         }
// 
//         return false;
//     }
// }
// 
// Path: src/main/java/com/evolvedbinary/xpath/parser/ast/PrimaryExpr.java
// public abstract class PrimaryExpr extends AbstractASTNode {
// }


// Path: src/main/java/com/evolvedbinary/xpath/parser/ast/partial/PartialFilterExpr.java
import com.evolvedbinary.xpath.parser.ast.FilterExpr;
import com.evolvedbinary.xpath.parser.ast.PredicateList;
import com.evolvedbinary.xpath.parser.ast.PrimaryExpr;

/**
 * XPath 2 Parser
 * A Parser for XPath 2
 * Copyright (C) 2016 Evolved Binary Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
package com.evolvedbinary.xpath.parser.ast.partial;


/**
 * Created by aretter on 11/02/2016.
 */
public class PartialFilterExpr extends AbstractPartialASTNode<FilterExpr, PredicateList> {
    final PrimaryExpr primaryExpr;

    public PartialFilterExpr(final PrimaryExpr primaryExpr) {
        this.primaryExpr = primaryExpr;
    }

    @Override
    protected String describe() {
        return "FilterExpr(" + primaryExpr + ", ?)";
    }

    @Override
    public FilterExpr complete(final PredicateList predicateList) {