prerna.sablecc2.node.ARcol Maven / Gradle / Ivy
/* This file was generated by SableCC (http://www.sablecc.org/). */
package prerna.sablecc2.node;
import prerna.sablecc2.analysis.*;
@SuppressWarnings("nls")
public final class ARcol extends PRcol
{
private TFrameprefix _frameprefix_;
private TId _columnName_;
public ARcol()
{
// Constructor
}
public ARcol(
@SuppressWarnings("hiding") TFrameprefix _frameprefix_,
@SuppressWarnings("hiding") TId _columnName_)
{
// Constructor
setFrameprefix(_frameprefix_);
setColumnName(_columnName_);
}
@Override
public Object clone()
{
return new ARcol(
cloneNode(this._frameprefix_),
cloneNode(this._columnName_));
}
@Override
public void apply(Switch sw)
{
((Analysis) sw).caseARcol(this);
}
public TFrameprefix getFrameprefix()
{
return this._frameprefix_;
}
public void setFrameprefix(TFrameprefix node)
{
if(this._frameprefix_ != null)
{
this._frameprefix_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._frameprefix_ = node;
}
public TId getColumnName()
{
return this._columnName_;
}
public void setColumnName(TId node)
{
if(this._columnName_ != null)
{
this._columnName_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._columnName_ = node;
}
@Override
public String toString()
{
return ""
+ toString(this._frameprefix_)
+ toString(this._columnName_);
}
@Override
void removeChild(@SuppressWarnings("unused") Node child)
{
// Remove child
if(this._frameprefix_ == child)
{
this._frameprefix_ = null;
return;
}
if(this._columnName_ == child)
{
this._columnName_ = null;
return;
}
throw new RuntimeException("Not a child.");
}
@Override
void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
{
// Replace child
if(this._frameprefix_ == oldChild)
{
setFrameprefix((TFrameprefix) newChild);
return;
}
if(this._columnName_ == oldChild)
{
setColumnName((TId) newChild);
return;
}
throw new RuntimeException("Not a child.");
}
}