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 AConnectorEndList extends PConnectorEndList
  {
      private PConnectorEnd _connectorEnd_;
      private PConnectorEndListTail _connectorEndListTail_;
  
      public AConnectorEndList()
      {
          // Constructor
      }
  
      public AConnectorEndList(
          @SuppressWarnings("hiding") PConnectorEnd _connectorEnd_,
          @SuppressWarnings("hiding") PConnectorEndListTail _connectorEndListTail_)
      {
          // Constructor
          setConnectorEnd(_connectorEnd_);
  
          setConnectorEndListTail(_connectorEndListTail_);
  
      }
  
      @Override
      public Object clone()
      {
          return new AConnectorEndList(
              cloneNode(this._connectorEnd_),
              cloneNode(this._connectorEndListTail_));
      }
  
      public void apply(Switch sw)
      {
          ((Analysis) sw).caseAConnectorEndList(this);
      }
  
      public PConnectorEnd getConnectorEnd()
      {
          return this._connectorEnd_;
      }
  
      public void setConnectorEnd(PConnectorEnd node)
      {
          if(this._connectorEnd_ != null)
          {
              this._connectorEnd_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._connectorEnd_ = node;
      }
  
      public PConnectorEndListTail getConnectorEndListTail()
      {
          return this._connectorEndListTail_;
      }
  
      public void setConnectorEndListTail(PConnectorEndListTail node)
      {
          if(this._connectorEndListTail_ != null)
          {
              this._connectorEndListTail_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._connectorEndListTail_ = node;
      }
  
      @Override
      public String toString()
      {
          return ""
              + toString(this._connectorEnd_)
              + toString(this._connectorEndListTail_);
      }
  
      @Override
      void removeChild(@SuppressWarnings("unused") Node child)
      {
          // Remove child
          if(this._connectorEnd_ == child)
          {
              this._connectorEnd_ = null;
              return;
          }
  
          if(this._connectorEndListTail_ == child)
          {
              this._connectorEndListTail_ = null;
              return;
          }
  
          throw new RuntimeException("Not a child.");
      }
  
      @Override
      void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
      {
          // Replace child
          if(this._connectorEnd_ == oldChild)
          {
              setConnectorEnd((PConnectorEnd) newChild);
              return;
          }
  
          if(this._connectorEndListTail_ == oldChild)
          {
              setConnectorEndListTail((PConnectorEndListTail) newChild);
              return;
          }
  
          throw new RuntimeException("Not a child.");
      }
  }
  