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

prerna.sablecc2.node.AExplicitComparatorRelationship 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 AExplicitComparatorRelationship extends PRelationship
{
    private PExplicitRelComparator _explicitRelComparator_;

    public AExplicitComparatorRelationship()
    {
        // Constructor
    }

    public AExplicitComparatorRelationship(
        @SuppressWarnings("hiding") PExplicitRelComparator _explicitRelComparator_)
    {
        // Constructor
        setExplicitRelComparator(_explicitRelComparator_);

    }

    @Override
    public Object clone()
    {
        return new AExplicitComparatorRelationship(
            cloneNode(this._explicitRelComparator_));
    }

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

    public PExplicitRelComparator getExplicitRelComparator()
    {
        return this._explicitRelComparator_;
    }

    public void setExplicitRelComparator(PExplicitRelComparator node)
    {
        if(this._explicitRelComparator_ != null)
        {
            this._explicitRelComparator_.parent(null);
        }

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

            node.parent(this);
        }

        this._explicitRelComparator_ = node;
    }

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

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy