public static Generator newInstance(HashMap params) throws Exception {
        Generator g = null;
        
        String format = (String)params.get("format");
        
        if(format.equals("numeric")) {
            g = new RandomNumberGenerator(params);
        } else if (format.equals("stringpattern")) {
            g = new PatternStringGenerator(params);
        } else {
            //unsupported...
            throw new Exception("unsupported generator... '" + format +"'");
        }
        return g;
    }