/* This file was generated by SableCC (http://www.sablecc.org/). */

package uk.co.zonetora.fj.ast.node;

import java.util.*;
import uk.co.zonetora.fj.ast.analysis.*;

public final class ANonLeftRecTermTerm extends PTerm
{
    private PNonLeftRecTerm _nonLeftRecTerm_;

    public ANonLeftRecTermTerm()
    {
    }

    public ANonLeftRecTermTerm(
        PNonLeftRecTerm _nonLeftRecTerm_)
    {
        setNonLeftRecTerm(_nonLeftRecTerm_);

    }
    public Object clone()
    {
        return new ANonLeftRecTermTerm(
            (PNonLeftRecTerm) cloneNode(_nonLeftRecTerm_));
    }

    public void apply(Switch sw)
    {
        ((Analysis) sw).caseANonLeftRecTermTerm(this);
    }

    public PNonLeftRecTerm getNonLeftRecTerm()
    {
        return _nonLeftRecTerm_;
    }

    public void setNonLeftRecTerm(PNonLeftRecTerm node)
    {
        if(_nonLeftRecTerm_ != null)
        {
            _nonLeftRecTerm_.parent(null);
        }

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

            node.parent(this);
        }

        _nonLeftRecTerm_ = node;
    }

    public String toString()
    {
        return ""
            + toString(_nonLeftRecTerm_);
    }

    void removeChild(Node child)
    {
        if(_nonLeftRecTerm_ == child)
        {
            _nonLeftRecTerm_ = null;
            return;
        }

    }

    void replaceChild(Node oldChild, Node newChild)
    {
        if(_nonLeftRecTerm_ == oldChild)
        {
            setNonLeftRecTerm((PNonLeftRecTerm) newChild);
            return;
        }

    }
}
