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

DynamicMap.java

00001 package gov.nasa.arc.ase.jpf.jvm;
00002 
00003 import java.util.Hashtable;
00004 
00005 class DynamicMap {
00006 // ifdef NO_DYNAMIC_SYMMETRY
00007   static Hashtable Map = new Hashtable();
00008   static int numEntries = 0;
00009   
00010 //#endif NO_DYNAMIC_SYMMETRY
00011   public static int addEntry(DynamicMapIndex index) {
00012     if (Map.containsKey(index)) {
00013       return ((Integer)Map.get(index)).intValue();
00014     } else {
00015       Map.put(index.clone(), new Integer(numEntries));
00016       numEntries++;
00017       return numEntries-1;
00018     }
00019   }  
00020   public static int getEntry(DynamicMapIndex index) {
00021     return ((Integer)Map.get(index)).intValue();
00022   }  
00023   public static boolean hasEntry(DynamicMapIndex index) {
00024     return Map.containsKey(index);
00025   }  
00026 }

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