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

prerna.sablecc2.node.APosTermTerm 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 APosTermTerm extends PTerm
{
    private PPosTerm _posTerm_;

    public APosTermTerm()
    {
        // Constructor
    }

    public APosTermTerm(
        @SuppressWarnings("hiding") PPosTerm _posTerm_)
    {
        // Constructor
        setPosTerm(_posTerm_);

    }

    @Override
    public Object clone()
    {
        return new APosTermTerm(
            cloneNode(this._posTerm_));
    }

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

    public PPosTerm getPosTerm()
    {
        return this._posTerm_;
    }

    public void setPosTerm(PPosTerm node)
    {
        if(this._posTerm_ != null)
        {
            this._posTerm_.parent(null);
        }

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

            node.parent(this);
        }

        this._posTerm_ = node;
    }

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy