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 AOperationConstraint extends POperationConstraint
  {
      private TModelComment _modelComment_;
      private POperationConstraintKernel _operationConstraintKernel_;
  
      public AOperationConstraint()
      {
          // Constructor
      }
  
      public AOperationConstraint(
          @SuppressWarnings("hiding") TModelComment _modelComment_,
          @SuppressWarnings("hiding") POperationConstraintKernel _operationConstraintKernel_)
      {
          // Constructor
          setModelComment(_modelComment_);
  
          setOperationConstraintKernel(_operationConstraintKernel_);
  
      }
  
      @Override
      public Object clone()
      {
          return new AOperationConstraint(
              cloneNode(this._modelComment_),
              cloneNode(this._operationConstraintKernel_));
      }
  
      public void apply(Switch sw)
      {
          ((Analysis) sw).caseAOperationConstraint(this);
      }
  
      public TModelComment getModelComment()
      {
          return this._modelComment_;
      }
  
      public void setModelComment(TModelComment node)
      {
          if(this._modelComment_ != null)
          {
              this._modelComment_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._modelComment_ = node;
      }
  
      public POperationConstraintKernel getOperationConstraintKernel()
      {
          return this._operationConstraintKernel_;
      }
  
      public void setOperationConstraintKernel(POperationConstraintKernel node)
      {
          if(this._operationConstraintKernel_ != null)
          {
              this._operationConstraintKernel_.parent(null);
          }
  
          if(node != null)
          {
              if(node.parent() != null)
              {
                  node.parent().removeChild(node);
              }
  
              node.parent(this);
          }
  
          this._operationConstraintKernel_ = node;
      }
  
      @Override
      public String toString()
      {
          return ""
              + toString(this._modelComment_)
              + toString(this._operationConstraintKernel_);
      }
  
      @Override
      void removeChild(@SuppressWarnings("unused") Node child)
      {
          // Remove child
          if(this._modelComment_ == child)
          {
              this._modelComment_ = null;
              return;
          }
  
          if(this._operationConstraintKernel_ == child)
          {
              this._operationConstraintKernel_ = null;
              return;
          }
  
          throw new RuntimeException("Not a child.");
      }
  
      @Override
      void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
      {
          // Replace child
          if(this._modelComment_ == oldChild)
          {
              setModelComment((TModelComment) newChild);
              return;
          }
  
          if(this._operationConstraintKernel_ == oldChild)
          {
              setOperationConstraintKernel((POperationConstraintKernel) newChild);
              return;
          }
  
          throw new RuntimeException("Not a child.");
      }
  }
  