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
00008 private int threadref;
00009
00010 private int occurrence;
00011
00012 public DynamicMapIndex(Instruction p,
00013
00014 int t,
00015
00016 int o) {
00017 super();
00018
00019 pc = p;
00020
00021 threadref = t;
00022
00023 occurrence = o;
00024 }
00025 public Object clone() {
00026 return new DynamicMapIndex(pc,
00027
00028 threadref,
00029
00030 occurrence);
00031 }
00032 public boolean equals(Object obj) {
00033 DynamicMapIndex index = (DynamicMapIndex)obj;
00034
00035 return pc == index.pc &&
00036
00037 threadref == index.threadref &&
00038
00039 occurrence == index.occurrence;
00040 }
00041 public int hashCode() {
00042 return (pc == null ? 0 : pc.getPosition()) +
00043
00044 threadref +
00045
00046 occurrence;
00047 }
00048 public void next() {
00049 occurrence++;
00050 }
00051 }