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

package MONAViewer.monalanguage.node;

import java.util.*;
import MONAViewer.monalanguage.analysis.*;

public final class AVar0Par extends PPar
{
    private TName _name_;

    public AVar0Par ()
    {
    }

    public AVar0Par (
            TName _name_
    )
    {
        setName (_name_);
    }

    public Object clone()
    {
        return new AVar0Par (
            (TName)cloneNode (_name_)
        );
    }

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

    public TName getName ()
    {
        return _name_;
    }

    public void setName (TName node)
    {
        if(_name_ != null)
        {
            _name_.parent(null);
        }

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

            node.parent(this);
        }

        _name_ = node;
    }

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

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

    void replaceChild(Node oldChild, Node newChild)
    {
        if ( _name_ == oldChild )
        {
            setName ((TName) newChild);
            return;
        }
    }

}
