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

com.github.rutledgepaulv.qbuilders.nodes.AbstractNode Maven / Gradle / Ivy

/*
 *
 *  *  com.github.rutledgepaulv.qbuilders.nodes.AbstractNode
 *  *  *
 *  *  * 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.nodes;

import com.github.rutledgepaulv.qbuilders.visitors.ContextualNodeVisitor;

public abstract class AbstractNode implements Visitable {

    private LogicalNode parent;

    public AbstractNode() {}

    public AbstractNode(LogicalNode parent) {
        this.parent = parent;
    }

    public LogicalNode getParent() {
        return parent;
    }

    public void setParent(LogicalNode parent) {
        this.parent = parent;
    }

    @Override
    public  T visit(ContextualNodeVisitor visitor, S context) {
        return visitor.visitAny(this, context);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy