org.geolatte.common.cql.node.ANumericLiteral 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 ANumericLiteral extends PLiteral
{
private PNumericLiteral _numericLiteral_;
public ANumericLiteral()
{
// Constructor
}
public ANumericLiteral(
@SuppressWarnings("hiding") PNumericLiteral _numericLiteral_)
{
// Constructor
setNumericLiteral(_numericLiteral_);
}
@Override
public Object clone()
{
return new ANumericLiteral(
cloneNode(this._numericLiteral_));
}
public void apply(Switch sw)
{
((Analysis) sw).caseANumericLiteral(this);
}
public PNumericLiteral getNumericLiteral()
{
return this._numericLiteral_;
}
public void setNumericLiteral(PNumericLiteral node)
{
if(this._numericLiteral_ != null)
{
this._numericLiteral_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._numericLiteral_ = node;
}
@Override
public String toString()
{
return ""
+ toString(this._numericLiteral_);
}
@Override
void removeChild(@SuppressWarnings("unused") Node child)
{
// Remove child
if(this._numericLiteral_ == child)
{
this._numericLiteral_ = null;
return;
}
throw new RuntimeException("Not a child.");
}
@Override
void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
{
// Replace child
if(this._numericLiteral_ == oldChild)
{
setNumericLiteral((PNumericLiteral) newChild);
return;
}
throw new RuntimeException("Not a child.");
}
}