content: /* This file was generated by SableCC (http://www.sablecc.org/). */
  
  package com.abstratt.mdd.frontend.textuml.grammar.node;
  
  import com.abstratt.mdd.frontend.textuml.grammar.analysis.*;
  
  @SuppressWarnings("nls")
  public final class AAssociationRoleDeclList extends PAssociationRoleDeclList
  {
      private PAssociationRoleDecl _associationRoleDecl_;
      private PAssociationRoleDeclList _associationRoleDeclList_;
  
      public AAssociationRoleDeclList()
      {
          // Constructor
      }
  
      public AAssociationRoleDeclList(
          @SuppressWarnings("hiding") PAssociationRoleDecl _associationRoleDecl_,
          @SuppressWarnings("hiding") PAssociationRoleDeclList _associationRoleDeclList_)
      {
          // Constructor
          setAssociationRoleDecl(_associationRoleDecl_);
  
          setAssociationRoleDeclList(_associationRoleDeclList_);
  
      }
  
      @Override
      public Object clone()
      {
          return new AAssociationRoleDeclList(
              cloneNode(this._associationRoleDecl_),
              cloneNode(this._associationRoleDeclList_));
      }
  
      public void apply(Switch sw)
      {
          ((Analysis) sw).caseAAssociationRoleDeclList(this);
      }
  
      public PAssociationRoleDecl getAssociationRoleDecl()
      {
          return this._associationRoleDecl_;
      }
  
      public void setAssociationRoleDecl(PAssociationRoleDecl node)
      {
          if(this._associationRoleDecl_ != null)
          {
              this._associationRoleDecl_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._associationRoleDecl_ = node;
      }
  
      public PAssociationRoleDeclList getAssociationRoleDeclList()
      {
          return this._associationRoleDeclList_;
      }
  
      public void setAssociationRoleDeclList(PAssociationRoleDeclList node)
      {
          if(this._associationRoleDeclList_ != null)
          {
              this._associationRoleDeclList_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._associationRoleDeclList_ = node;
      }
  
      @Override
      public String toString()
      {
          return ""
              + toString(this._associationRoleDecl_)
              + toString(this._associationRoleDeclList_);
      }
  
      @Override
      void removeChild(@SuppressWarnings("unused") Node child)
      {
          // Remove child
          if(this._associationRoleDecl_ == child)
          {
              this._associationRoleDecl_ = null;
              return;
          }
  
          if(this._associationRoleDeclList_ == child)
          {
              this._associationRoleDeclList_ = null;
              return;
          }
  
          throw new RuntimeException("Not a child.");
      }
  
      @Override
      void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
      {
          // Replace child
          if(this._associationRoleDecl_ == oldChild)
          {
              setAssociationRoleDecl((PAssociationRoleDecl) newChild);
              return;
          }
  
          if(this._associationRoleDeclList_ == oldChild)
          {
              setAssociationRoleDeclList((PAssociationRoleDeclList) newChild);
              return;
          }
  
          throw new RuntimeException("Not a child.");
      }
  }
  