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

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

There is a newer version: 4.2.2
Show 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 AOtherOpInput extends POtherOpInput
{
    private TComma _comma_;
    private POpInput _opInput_;

    public AOtherOpInput()
    {
        // Constructor
    }

    public AOtherOpInput(
        @SuppressWarnings("hiding") TComma _comma_,
        @SuppressWarnings("hiding") POpInput _opInput_)
    {
        // Constructor
        setComma(_comma_);

        setOpInput(_opInput_);

    }

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

    @Override
    public void apply(Switch sw)
    {
        ((Analysis) sw).caseAOtherOpInput(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 POpInput getOpInput()
    {
        return this._opInput_;
    }

    public void setOpInput(POpInput node)
    {
        if(this._opInput_ != null)
        {
            this._opInput_.parent(null);
        }

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

            node.parent(this);
        }

        this._opInput_ = node;
    }

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

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

        if(this._opInput_ == child)
        {
            this._opInput_ = 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._opInput_ == oldChild)
        {
            setOpInput((POpInput) newChild);
            return;
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy