org.geolatte.common.cql.node.ANotExpr Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of geolatte-common Show documentation
Show all versions of geolatte-common Show documentation
This GeoLatte-common library contains the transformer framework and other common classes used by other
GeoLatte modules.
/* This file was generated by SableCC (http://www.sablecc.org/). */
package org.geolatte.common.cql.node;
import org.geolatte.common.cql.analysis.*;
@SuppressWarnings("nls")
public final class ANotExpr extends PExpr
{
private PExpr _expr_;
public ANotExpr()
{
// Constructor
}
public ANotExpr(
@SuppressWarnings("hiding") PExpr _expr_)
{
// Constructor
setExpr(_expr_);
}
@Override
public Object clone()
{
return new ANotExpr(
cloneNode(this._expr_));
}
public void apply(Switch sw)
{
((Analysis) sw).caseANotExpr(this);
}
public PExpr getExpr()
{
return this._expr_;
}
public void setExpr(PExpr node)
{
if(this._expr_ != null)
{
this._expr_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._expr_ = node;
}
@Override
public String toString()
{
return ""
+ toString(this._expr_);
}
@Override
void removeChild(@SuppressWarnings("unused") Node child)
{
// Remove child
if(this._expr_ == child)
{
this._expr_ = null;
return;
}
throw new RuntimeException("Not a child.");
}
@Override
void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
{
// Replace child
if(this._expr_ == oldChild)
{
setExpr((PExpr) newChild);
return;
}
throw new RuntimeException("Not a child.");
}
}