All Downloads are FREE. Search and download functionalities are using the official Maven repository.

prerna.sablecc2.node.AOtherExpr Maven / Gradle / Ivy

The newest version!
/* This file was generated by SableCC (http://www.sablecc.org/). */

package prerna.sablecc2.node;

import prerna.sablecc2.analysis.*;

@SuppressWarnings("nls")
public final class AOtherExpr extends POtherExpr
{
    private TComma _comma_;
    private PMasterExpr _masterExpr_;

    public AOtherExpr()
    {
        // Constructor
    }

    public AOtherExpr(
        @SuppressWarnings("hiding") TComma _comma_,
        @SuppressWarnings("hiding") PMasterExpr _masterExpr_)
    {
        // Constructor
        setComma(_comma_);

        setMasterExpr(_masterExpr_);

    }

    @Override
    public Object clone()
    {
        return new AOtherExpr(
            cloneNode(this._comma_),
            cloneNode(this._masterExpr_));
    }

    @Override
    public void apply(Switch sw)
    {
        ((Analysis) sw).caseAOtherExpr(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 PMasterExpr getMasterExpr()
    {
        return this._masterExpr_;
    }

    public void setMasterExpr(PMasterExpr node)
    {
        if(this._masterExpr_ != null)
        {
            this._masterExpr_.parent(null);
        }

        if(node != null)
        {
            if(node.parent() != null)
            {
                node.parent().removeChild(node);
            }

            node.parent(this);
        }

        this._masterExpr_ = node;
    }

    @Override
    public String toString()
    {
        return ""
            + toString(this._comma_)
            + toString(this._masterExpr_);
    }

    @Override
    void removeChild(@SuppressWarnings("unused") Node child)
    {
        // Remove child
        if(this._comma_ == child)
        {
            this._comma_ = null;
            return;
        }

        if(this._masterExpr_ == child)
        {
            this._masterExpr_ = 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._masterExpr_ == oldChild)
        {
            setMasterExpr((PMasterExpr) newChild);
            return;
        }

        throw new RuntimeException("Not a child.");
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy