prerna.sablecc2.node.AProjectors 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 AProjectors extends PProjectors
{
private TProjectid _projectid_;
private PGenRow _genRow_;
public AProjectors()
{
// Constructor
}
public AProjectors(
@SuppressWarnings("hiding") TProjectid _projectid_,
@SuppressWarnings("hiding") PGenRow _genRow_)
{
// Constructor
setProjectid(_projectid_);
setGenRow(_genRow_);
}
@Override
public Object clone()
{
return new AProjectors(
cloneNode(this._projectid_),
cloneNode(this._genRow_));
}
@Override
public void apply(Switch sw)
{
((Analysis) sw).caseAProjectors(this);
}
public TProjectid getProjectid()
{
return this._projectid_;
}
public void setProjectid(TProjectid node)
{
if(this._projectid_ != null)
{
this._projectid_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._projectid_ = node;
}
public PGenRow getGenRow()
{
return this._genRow_;
}
public void setGenRow(PGenRow node)
{
if(this._genRow_ != null)
{
this._genRow_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._genRow_ = node;
}
@Override
public String toString()
{
return ""
+ toString(this._projectid_)
+ toString(this._genRow_);
}
@Override
void removeChild(@SuppressWarnings("unused") Node child)
{
// Remove child
if(this._projectid_ == child)
{
this._projectid_ = null;
return;
}
if(this._genRow_ == child)
{
this._genRow_ = null;
return;
}
throw new RuntimeException("Not a child.");
}
@Override
void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
{
// Replace child
if(this._projectid_ == oldChild)
{
setProjectid((TProjectid) newChild);
return;
}
if(this._genRow_ == oldChild)
{
setGenRow((PGenRow) newChild);
return;
}
throw new RuntimeException("Not a child.");
}
}