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