<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">/* This file was generated by SableCC (http://www.sablecc.org/). */

package joosc.node;

import java.util.*;
import joosc.analysis.*;

public final class AIfelseStmNoShortIf extends PStmNoShortIf
{
    private TIf _if_;
    private TLPar _lPar_;
    private PExp _exp_;
    private TRPar _rPar_;
    private PStm _thenStm_;
    private TElse _else_;
    private PStm _elseStm_;

    public AIfelseStmNoShortIf()
    {
    }

    public AIfelseStmNoShortIf(
        TIf _if_,
        TLPar _lPar_,
        PExp _exp_,
        TRPar _rPar_,
        PStm _thenStm_,
        TElse _else_,
        PStm _elseStm_)
    {
        setIf(_if_);

        setLPar(_lPar_);

        setExp(_exp_);

        setRPar(_rPar_);

        setThenStm(_thenStm_);

        setElse(_else_);

        setElseStm(_elseStm_);

    }
    public Object clone()
    {
        return new AIfelseStmNoShortIf(
            (TIf) cloneNode(_if_),
            (TLPar) cloneNode(_lPar_),
            (PExp) cloneNode(_exp_),
            (TRPar) cloneNode(_rPar_),
            (PStm) cloneNode(_thenStm_),
            (TElse) cloneNode(_else_),
            (PStm) cloneNode(_elseStm_));
    }

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

    public TIf getIf()
    {
        return _if_;
    }

    public void setIf(TIf node)
    {
        if(_if_ != null)
        {
            _if_.parent(null);
        }

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

            node.parent(this);
        }

        _if_ = node;
    }

    public TLPar getLPar()
    {
        return _lPar_;
    }

    public void setLPar(TLPar node)
    {
        if(_lPar_ != null)
        {
            _lPar_.parent(null);
        }

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

            node.parent(this);
        }

        _lPar_ = node;
    }

    public PExp getExp()
    {
        return _exp_;
    }

    public void setExp(PExp node)
    {
        if(_exp_ != null)
        {
            _exp_.parent(null);
        }

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

            node.parent(this);
        }

        _exp_ = node;
    }

    public TRPar getRPar()
    {
        return _rPar_;
    }

    public void setRPar(TRPar node)
    {
        if(_rPar_ != null)
        {
            _rPar_.parent(null);
        }

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

            node.parent(this);
        }

        _rPar_ = node;
    }

    public PStm getThenStm()
    {
        return _thenStm_;
    }

    public void setThenStm(PStm node)
    {
        if(_thenStm_ != null)
        {
            _thenStm_.parent(null);
        }

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

            node.parent(this);
        }

        _thenStm_ = node;
    }

    public TElse getElse()
    {
        return _else_;
    }

    public void setElse(TElse node)
    {
        if(_else_ != null)
        {
            _else_.parent(null);
        }

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

            node.parent(this);
        }

        _else_ = node;
    }

    public PStm getElseStm()
    {
        return _elseStm_;
    }

    public void setElseStm(PStm node)
    {
        if(_elseStm_ != null)
        {
            _elseStm_.parent(null);
        }

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

            node.parent(this);
        }

        _elseStm_ = node;
    }

    public String toString()
    {
        return ""
            + toString(_if_)
            + toString(_lPar_)
            + toString(_exp_)
            + toString(_rPar_)
            + toString(_thenStm_)
            + toString(_else_)
            + toString(_elseStm_);
    }

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

        if(_lPar_ == child)
        {
            _lPar_ = null;
            return;
        }

        if(_exp_ == child)
        {
            _exp_ = null;
            return;
        }

        if(_rPar_ == child)
        {
            _rPar_ = null;
            return;
        }

        if(_thenStm_ == child)
        {
            _thenStm_ = null;
            return;
        }

        if(_else_ == child)
        {
            _else_ = null;
            return;
        }

        if(_elseStm_ == child)
        {
            _elseStm_ = null;
            return;
        }

    }

    void replaceChild(Node oldChild, Node newChild)
    {
        if(_if_ == oldChild)
        {
            setIf((TIf) newChild);
            return;
        }

        if(_lPar_ == oldChild)
        {
            setLPar((TLPar) newChild);
            return;
        }

        if(_exp_ == oldChild)
        {
            setExp((PExp) newChild);
            return;
        }

        if(_rPar_ == oldChild)
        {
            setRPar((TRPar) newChild);
            return;
        }

        if(_thenStm_ == oldChild)
        {
            setThenStm((PStm) newChild);
            return;
        }

        if(_else_ == oldChild)
        {
            setElse((TElse) newChild);
            return;
        }

        if(_elseStm_ == oldChild)
        {
            setElseStm((PStm) newChild);
            return;
        }

    }
}
</pre></body></html>