All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.rutledgepaulv.qbuilders.visitors.AbstractVoidContextNodeVisitor Maven / Gradle / Ivy

/*
 *
 *  *  com.github.rutledgepaulv.qbuilders.visitors.AbstractVoidContextNodeVisitor
 *  *  *
 *  *  * Copyright (C) 2016 Paul Rutledge 
 *  *  *
 *  *  * This software may be modified and distributed under the terms
 *  *  * of the MIT license.  See the LICENSE file for details.
 *  *
 *
 */

package com.github.rutledgepaulv.qbuilders.visitors;


import com.github.rutledgepaulv.qbuilders.nodes.*;

@SuppressWarnings("ConstantConditions")
public abstract class AbstractVoidContextNodeVisitor extends ContextualNodeVisitor {

    @Override
    protected final T visit(AndNode node, Void context) {
        return visit(node);
    }

    @Override
    protected final T visit(OrNode node, Void context) {
        return visit(node);
    }

    @Override
    protected final T visit(ComparisonNode node, Void context) {
        return visit(node);
    }

    protected abstract T visit(AndNode node);

    protected abstract T visit(OrNode node);

    protected abstract T visit(ComparisonNode node);

    protected T condition(ComparisonNode node) {
        return condition(node, null);
    }

    public final T visitAny(AbstractNode node) {
        return visitAny(node, null);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy