/* This file was generated by SableCC (http://www.sablecc.org/). */
package net.sourceforge.texlipse.bibparser.node;
import net.sourceforge.texlipse.bibparser.analysis.*;
@SuppressWarnings("nls")
public final class AConcat extends PConcat
{
private PValOrSid _valOrSid_;
public AConcat()
{
// Constructor
}
public AConcat(
@SuppressWarnings("hiding") PValOrSid _valOrSid_)
{
// Constructor
setValOrSid(_valOrSid_);
}
@Override
public Object clone()
{
return new AConcat(
cloneNode(this._valOrSid_));
}
public void apply(Switch sw)
{
((Analysis) sw).caseAConcat(this);
}
public PValOrSid getValOrSid()
{
return this._valOrSid_;
}
public void setValOrSid(PValOrSid node)
{
if(this._valOrSid_ != null)
{
this._valOrSid_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._valOrSid_ = node;
}
@Override
public String toString()
{
return ""
+ toString(this._valOrSid_);
}
@Override
void removeChild(@SuppressWarnings("unused") Node child)
{
// Remove child
if(this._valOrSid_ == child)
{
this._valOrSid_ = null;
return;
}
throw new RuntimeException("Not a child.");
}
@Override
void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
{
// Replace child
if(this._valOrSid_ == oldChild)
{
setValOrSid((PValOrSid) newChild);
return;
}
throw new RuntimeException("Not a child.");
}
}