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 AMemberAssociationEnd extends PAssociationEnd
  {
      private PAssociationMemberEnd _associationMemberEnd_;
  
      public AMemberAssociationEnd()
      {
          // Constructor
      }
  
      public AMemberAssociationEnd(
          @SuppressWarnings("hiding") PAssociationMemberEnd _associationMemberEnd_)
      {
          // Constructor
          setAssociationMemberEnd(_associationMemberEnd_);
  
      }
  
      @Override
      public Object clone()
      {
          return new AMemberAssociationEnd(
              cloneNode(this._associationMemberEnd_));
      }
  
      public void apply(Switch sw)
      {
          ((Analysis) sw).caseAMemberAssociationEnd(this);
      }
  
      public PAssociationMemberEnd getAssociationMemberEnd()
      {
          return this._associationMemberEnd_;
      }
  
      public void setAssociationMemberEnd(PAssociationMemberEnd node)
      {
          if(this._associationMemberEnd_ != null)
          {
              this._associationMemberEnd_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._associationMemberEnd_ = node;
      }
  
      @Override
      public String toString()
      {
          return ""
              + toString(this._associationMemberEnd_);
      }
  
      @Override
      void removeChild(@SuppressWarnings("unused") Node child)
      {
          // Remove child
          if(this._associationMemberEnd_ == child)
          {
              this._associationMemberEnd_ = null;
              return;
          }
  
          throw new RuntimeException("Not a child.");
      }
  
      @Override
      void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
      {
          // Replace child
          if(this._associationMemberEnd_ == oldChild)
          {
              setAssociationMemberEnd((PAssociationMemberEnd) newChild);
              return;
          }
  
          throw new RuntimeException("Not a child.");
      }
  }
  