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

Unit.java

00001 package gov.nasa.arc.ase.jpf.jvm.runtime;
00002 
00003 import gov.nasa.arc.ase.jpf.*;
00004 import gov.nasa.arc.ase.jpf.jvm.*;
00005 import java.util.*;
00006 import gov.nasa.arc.ase.util.Debug;
00007 import gov.nasa.arc.ase.util.PoolObject;
00008 
00009 public class Unit extends PoolObject implements DESCR {
00010 // ifdef RACE
00011   private Ref ref;
00012   private String className;
00013 
00014 //#endif RACE
00015   public Unit(Ref ref, String className){
00016     this.ref = ref;
00017     this.className = className;   
00018   }  
00019   public boolean equals(Object unit){
00020     Ref otherRef = ((Unit)unit).getRef();
00021     String otherClassName = ((Unit)unit).getClassName();
00022     return ref.equals(otherRef) && className.equals(otherClassName);
00023   }  
00024   public String getClassName(){
00025     return className;
00026   }  
00027   public Ref getRef(){
00028     return ref;
00029   }  
00030   public int hashCode(){
00031     return ref.getReference();
00032   }  
00033   public void print(){
00034     Debug.print(Debug.ERROR, className + "[" + ref + "]");
00035   }  
00036 }

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