//
// RThreadGroupMap.pfi helper
//
helper
import java.util.Hashtable;
import naccio.library.Check;
public class RThreadGroupMap {
static private Hashtable fmap = new Hashtable ();
static private int ncount = 0;
public static RThread add (java.lang.ThreadGroup f) {
ncount++;
// util.Assert.showStack ();
RThread rf = new RThreadGroup (f);
fmap.put (f, rf);
return rf;
}
public static RThread lookupAdd (java.lang.ThreadGroup f) {
// NCheck.message ("lookup add: " + f.getClass ());
NCheck.assertPrint (f != null, "f is null!");
RThread rf = lookup (f);
if (rf == null) {
rf = add (f);
}
NCheck.assertPrint (rf != null, "null 1");
return rf;
}
public static RThread lookup (Object f) {
NCheck.assertPrint (f != null, "f is null!");
NCheck.assert (fmap != null);
RThread rf = (RThread) fmap.get (f);
return rf;
}
}
Naccio Home Page
University of Virginia, Computer Science