Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

AOne2oneSet.java

00001 package edu.ksu.cis.bandera.abstraction.specification.node;
00002 
00003 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
00004  * Bandera, a Java(TM) analysis and transformation toolkit           *
00005  * Copyright (C) 1998-2001 SAnToS Laboratories (santos@cis.ksu.edu)  *
00006 
00007  * All rights reserved.                                              *
00008  *                                                                   *
00009  * This work was done as a project in the SAnToS Laboratory,         *
00010  * Department of Computing and Information Sciences, Kansas State    *
00011  * University, USA (http://www.cis.ksu.edu/santos).                  *
00012  * It is understood that any modification not identified as such is  *
00013  * not covered by the preceding statement.                           *
00014  *                                                                   *
00015  * This work is free software; you can redistribute it and/or        *
00016  * modify it under the terms of the GNU Library General Public       *
00017  * License as published by the Free Software Foundation; either      *
00018  * version 2 of the License, or (at your option) any later version.  *
00019  *                                                                   *
00020  * This work is distributed in the hope that it will be useful,      *
00021  * but WITHOUT ANY WARRANTY; without even the implied warranty of    *
00022  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU *
00023  * Library General Public License for more details.                  *
00024  *                                                                   *
00025  * You should have received a copy of the GNU Library General Public *
00026  * License along with this toolkit; if not, write to the             *
00027  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,      *
00028  * Boston, MA  02111-1307, USA.                                      *
00029  *                                                                   *
00030  * Java is a trademark of Sun Microsystems, Inc.                     *
00031  *                                                                   *
00032  * To submit a bug report, send a comment, or get the latest news on *
00033  * this project and other SAnToS projects, please visit the web-site *
00034  *                http://www.cis.ksu.edu/santos                      *
00035  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
00036 /* This file was generated by SableCC (http://www.sable.mcgill.ca/sablecc/). */
00037 
00038 import java.util.*;
00039 import edu.ksu.cis.bandera.abstraction.specification.analysis.*;
00040 
00041 public final class AOne2oneSet extends POne2oneSet
00042 {
00043     private TOne2one _one2one_;
00044     private TEq _eq_;
00045     private TLBrace _lBrace_;
00046     private PIdList _idList_;
00047     private TRBrace _rBrace_;
00048     private TSemicolon _semicolon_;
00049 
00050     public AOne2oneSet()
00051     {
00052     }
00053     public AOne2oneSet(
00054         TOne2one _one2one_,
00055         TEq _eq_,
00056         TLBrace _lBrace_,
00057         PIdList _idList_,
00058         TRBrace _rBrace_,
00059         TSemicolon _semicolon_)
00060     {
00061         setOne2one(_one2one_);
00062 
00063         setEq(_eq_);
00064 
00065         setLBrace(_lBrace_);
00066 
00067         setIdList(_idList_);
00068 
00069         setRBrace(_rBrace_);
00070 
00071         setSemicolon(_semicolon_);
00072 
00073     }
00074     public void apply(Switch sw)
00075     {
00076         ((Analysis) sw).caseAOne2oneSet(this);
00077     }
00078     public Object clone()
00079     {
00080         return new AOne2oneSet(
00081             (TOne2one) cloneNode(_one2one_),
00082             (TEq) cloneNode(_eq_),
00083             (TLBrace) cloneNode(_lBrace_),
00084             (PIdList) cloneNode(_idList_),
00085             (TRBrace) cloneNode(_rBrace_),
00086             (TSemicolon) cloneNode(_semicolon_));
00087     }
00088     public TEq getEq()
00089     {
00090         return _eq_;
00091     }
00092     public PIdList getIdList()
00093     {
00094         return _idList_;
00095     }
00096     public TLBrace getLBrace()
00097     {
00098         return _lBrace_;
00099     }
00100     public TOne2one getOne2one()
00101     {
00102         return _one2one_;
00103     }
00104     public TRBrace getRBrace()
00105     {
00106         return _rBrace_;
00107     }
00108     public TSemicolon getSemicolon()
00109     {
00110         return _semicolon_;
00111     }
00112     void removeChild(Node child)
00113     {
00114         if(_one2one_ == child)
00115         {
00116             _one2one_ = null;
00117             return;
00118         }
00119 
00120         if(_eq_ == child)
00121         {
00122             _eq_ = null;
00123             return;
00124         }
00125 
00126         if(_lBrace_ == child)
00127         {
00128             _lBrace_ = null;
00129             return;
00130         }
00131 
00132         if(_idList_ == child)
00133         {
00134             _idList_ = null;
00135             return;
00136         }
00137 
00138         if(_rBrace_ == child)
00139         {
00140             _rBrace_ = null;
00141             return;
00142         }
00143 
00144         if(_semicolon_ == child)
00145         {
00146             _semicolon_ = null;
00147             return;
00148         }
00149 
00150     }
00151     void replaceChild(Node oldChild, Node newChild)
00152     {
00153         if(_one2one_ == oldChild)
00154         {
00155             setOne2one((TOne2one) newChild);
00156             return;
00157         }
00158 
00159         if(_eq_ == oldChild)
00160         {
00161             setEq((TEq) newChild);
00162             return;
00163         }
00164 
00165         if(_lBrace_ == oldChild)
00166         {
00167             setLBrace((TLBrace) newChild);
00168             return;
00169         }
00170 
00171         if(_idList_ == oldChild)
00172         {
00173             setIdList((PIdList) newChild);
00174             return;
00175         }
00176 
00177         if(_rBrace_ == oldChild)
00178         {
00179             setRBrace((TRBrace) newChild);
00180             return;
00181         }
00182 
00183         if(_semicolon_ == oldChild)
00184         {
00185             setSemicolon((TSemicolon) newChild);
00186             return;
00187         }
00188 
00189     }
00190     public void setEq(TEq node)
00191     {
00192         if(_eq_ != null)
00193         {
00194             _eq_.parent(null);
00195         }
00196 
00197         if(node != null)
00198         {
00199             if(node.parent() != null)
00200             {
00201                 node.parent().removeChild(node);
00202             }
00203 
00204             node.parent(this);
00205         }
00206 
00207         _eq_ = node;
00208     }
00209     public void setIdList(PIdList node)
00210     {
00211         if(_idList_ != null)
00212         {
00213             _idList_.parent(null);
00214         }
00215 
00216         if(node != null)
00217         {
00218             if(node.parent() != null)
00219             {
00220                 node.parent().removeChild(node);
00221             }
00222 
00223             node.parent(this);
00224         }
00225 
00226         _idList_ = node;
00227     }
00228     public void setLBrace(TLBrace node)
00229     {
00230         if(_lBrace_ != null)
00231         {
00232             _lBrace_.parent(null);
00233         }
00234 
00235         if(node != null)
00236         {
00237             if(node.parent() != null)
00238             {
00239                 node.parent().removeChild(node);
00240             }
00241 
00242             node.parent(this);
00243         }
00244 
00245         _lBrace_ = node;
00246     }
00247     public void setOne2one(TOne2one node)
00248     {
00249         if(_one2one_ != null)
00250         {
00251             _one2one_.parent(null);
00252         }
00253 
00254         if(node != null)
00255         {
00256             if(node.parent() != null)
00257             {
00258                 node.parent().removeChild(node);
00259             }
00260 
00261             node.parent(this);
00262         }
00263 
00264         _one2one_ = node;
00265     }
00266     public void setRBrace(TRBrace node)
00267     {
00268         if(_rBrace_ != null)
00269         {
00270             _rBrace_.parent(null);
00271         }
00272 
00273         if(node != null)
00274         {
00275             if(node.parent() != null)
00276             {
00277                 node.parent().removeChild(node);
00278             }
00279 
00280             node.parent(this);
00281         }
00282 
00283         _rBrace_ = node;
00284     }
00285     public void setSemicolon(TSemicolon node)
00286     {
00287         if(_semicolon_ != null)
00288         {
00289             _semicolon_.parent(null);
00290         }
00291 
00292         if(node != null)
00293         {
00294             if(node.parent() != null)
00295             {
00296                 node.parent().removeChild(node);
00297             }
00298 
00299             node.parent(this);
00300         }
00301 
00302         _semicolon_ = node;
00303     }
00304     public String toString()
00305     {
00306         return ""
00307             + toString(_one2one_)
00308             + toString(_eq_)
00309             + toString(_lBrace_)
00310             + toString(_idList_)
00311             + toString(_rBrace_)
00312             + toString(_semicolon_);
00313     }
00314 }

Generated at Thu Feb 7 06:38:55 2002 for Bandera by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001