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

com/ohrasys/cad/bnf/BNFTestableObject.java

Go to the documentation of this file.
00001 /* Copyright (C) 2004 Thomas N. Valine
00002  * tvaline@users.sourceforge.net
00003  *
00004  * This program is free software; you can redistribute it and/or modify it
00005  * under the terms of the GNU General Public License as published by the
00006  * Free Software Foundation; either version 2 of the License, or (at your
00007  * option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful, but
00010  * WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License along
00015  * with this program; if not, write to the Free Software Foundation, Inc.,
00016  * 59 Temple Place - Suite 330, Boston, MA
00017  * 02111-1307, USA. */
00018 
00019 package com.ohrasys.cad.bnf;
00020 
00028 public abstract class BNFTestableObject {
00030   private Object data;
00031 
00037   public BNFTestableObject(Object data){this.data = data;}
00038 
00044   public abstract int getToken();
00045 
00054   public boolean equals(Object obj) {
00055     if(!(obj instanceof BNFTestableObject)){return false;}
00056     else{return data.equals(((BNFTestableObject)obj).getData());}
00057   }
00058 
00064   public Object getData(){return this.data;}
00065 
00071   public int hashCode(){return data.hashCode();}
00072 
00078   public void setData(Object obj){this.data = obj;}
00079 
00085   public String toString(){return data.toString();}
00086 } // end class BNFTestableObject
00087 
00088 
00089 /* This material is distributed under the GNU General Public License.
00090  * For more information please go to http://www.gnu.org/copyleft/gpl.html
00091  */

Generated on Sun Nov 13 10:13:03 2005 for JavaBackus-NaurTestAPI(JBNT) by  doxygen 1.4.2