prerna.sablecc.node.ACsvGroup Maven / Gradle / Ivy
/* This file was generated by SableCC (http://www.sablecc.org/). */
package prerna.sablecc.node;
import prerna.sablecc.analysis.*;
@SuppressWarnings("nls")
public final class ACsvGroup extends PCsvGroup
{
private TComma _comma_;
private PWordOrNum _csv_;
public ACsvGroup()
{
// Constructor
}
public ACsvGroup(
@SuppressWarnings("hiding") TComma _comma_,
@SuppressWarnings("hiding") PWordOrNum _csv_)
{
// Constructor
setComma(_comma_);
setCsv(_csv_);
}
@Override
public Object clone()
{
return new ACsvGroup(
cloneNode(this._comma_),
cloneNode(this._csv_));
}
@Override
public void apply(Switch sw)
{
((Analysis) sw).caseACsvGroup(this);
}
public TComma getComma()
{
return this._comma_;
}
public void setComma(TComma node)
{
if(this._comma_ != null)
{
this._comma_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._comma_ = node;
}
public PWordOrNum getCsv()
{
return this._csv_;
}
public void setCsv(PWordOrNum node)
{
if(this._csv_ != null)
{
this._csv_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._csv_ = node;
}
@Override
public String toString()
{
return ""
+ toString(this._comma_)
+ toString(this._csv_);
}
@Override
void removeChild(@SuppressWarnings("unused") Node child)
{
// Remove child
if(this._comma_ == child)
{
this._comma_ = null;
return;
}
if(this._csv_ == child)
{
this._csv_ = null;
return;
}
throw new RuntimeException("Not a child.");
}
@Override
void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
{
// Replace child
if(this._comma_ == oldChild)
{
setComma((TComma) newChild);
return;
}
if(this._csv_ == oldChild)
{
setCsv((PWordOrNum) newChild);
return;
}
throw new RuntimeException("Not a child.");
}
}