Map cache = new HashMap();
Map cache = newCache();
    static public Set adaptFoundCGCIHierarchies(Set result) {        Set dataObjects = new HashSet();        Map cache = new HashMap();        for (Iterator i = result.iterator(); i.hasNext();) {            Object obj = i.next();            if (obj instanceof CategoryGroup) {                CategoryGroup cg = (CategoryGroup) obj;                dataObjects.add(AdapterUtils.go(cg,cache));            } else if (obj instanceof Category) {                Category ca = (Category) obj;                dataObjects.add(AdapterUtils.go(ca,cache));             } else if (obj instanceof Image) {                Image img = (Image) obj;                dataObjects.add(AdapterUtils.go(img,cache));            } else {                throw new RuntimeException("Method returned unexpected value type:" + obj.getClass()	);            }        }        return dataObjects;    }