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

prerna.sablecc2.node.AExplicitRelationship 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 AExplicitRelationship extends PRelationship
{
    private PExplicitRel _explicitRel_;

    public AExplicitRelationship()
    {
        // Constructor
    }

    public AExplicitRelationship(
        @SuppressWarnings("hiding") PExplicitRel _explicitRel_)
    {
        // Constructor
        setExplicitRel(_explicitRel_);

    }

    @Override
    public Object clone()
    {
        return new AExplicitRelationship(
            cloneNode(this._explicitRel_));
    }

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

    public PExplicitRel getExplicitRel()
    {
        return this._explicitRel_;
    }

    public void setExplicitRel(PExplicitRel node)
    {
        if(this._explicitRel_ != null)
        {
            this._explicitRel_.parent(null);
        }

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

            node.parent(this);
        }

        this._explicitRel_ = node;
    }

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

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy