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

prerna.sablecc2.node.ARefRegTerm 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 ARefRegTerm extends PRegTerm
{
    private PRcol _rcol_;

    public ARefRegTerm()
    {
        // Constructor
    }

    public ARefRegTerm(
        @SuppressWarnings("hiding") PRcol _rcol_)
    {
        // Constructor
        setRcol(_rcol_);

    }

    @Override
    public Object clone()
    {
        return new ARefRegTerm(
            cloneNode(this._rcol_));
    }

    @Override
    public void apply(Switch sw)
    {
        ((Analysis) sw).caseARefRegTerm(this);
    }

    public PRcol getRcol()
    {
        return this._rcol_;
    }

    public void setRcol(PRcol node)
    {
        if(this._rcol_ != null)
        {
            this._rcol_.parent(null);
        }

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

            node.parent(this);
        }

        this._rcol_ = node;
    }

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

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

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

    @Override
    void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
    {
        // Replace child
        if(this._rcol_ == oldChild)
        {
            setRcol((PRcol) newChild);
            return;
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy