com.github.rutledgepaulv.qbuilders.nodes.AbstractNode Maven / Gradle / Ivy
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);
}
}