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

DynamicMapIndex.java

00001 package gov.nasa.arc.ase.jpf.jvm;
00002 
00003 import gov.nasa.arc.ase.jpf.jvm.bytecode.Instruction;
00004 
00005 public class DynamicMapIndex {
00006   private Instruction pc;
00007 //#ifdef THREAD_SYMMETRY
00008   private int threadref;
00009 //#endif THREAD_SYMMETRY
00010   private int occurrence;
00011 
00012   public DynamicMapIndex(Instruction p,
00013 //#ifdef THREAD_SYMMETRY
00014       int t,
00015 //#endif THREAD_SYMMETRY
00016       int o) {
00017     super();
00018 
00019     pc = p;
00020 //#ifdef THREAD_SYMMETRY
00021     threadref = t;
00022 //#endif THREAD_SYMMETRY
00023     occurrence = o;
00024   }  
00025   public Object clone() {
00026     return new DynamicMapIndex(pc,
00027 //#ifdef THREAD_SYMMETRY
00028     threadref,
00029 //#endif THREAD_SYMMETRY
00030     occurrence);
00031   }  
00032   public boolean equals(Object obj) {
00033     DynamicMapIndex index = (DynamicMapIndex)obj;
00034 
00035     return pc == index.pc &&
00036 //#ifdef THREAD_SYMMETRY
00037       threadref == index.threadref &&
00038 //#endif THREAD_SYMMETRY
00039       occurrence == index.occurrence;
00040   }  
00041   public int hashCode() {
00042     return (pc == null ? 0 : pc.getPosition()) + 
00043 //#ifdef THREAD_SYMMETRY
00044       threadref + 
00045 //#endif THREAD_SYMMETRY
00046       occurrence;
00047   }  
00048   public void next() {
00049     occurrence++;
00050   }  
00051 }

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