Map cache = new HashMap();
Map cache = newCache();
    static public Set adaptFoundPDIHierarchies(Set result) {        Set dataObjects = new HashSet();        Map cache = new HashMap();        for (Iterator i = result.iterator(); i.hasNext();) {            Object obj = i.next();            if (obj instanceof Project) {                Project prj = (Project) obj;                dataObjects.add(AdapterUtils.go(prj,cache));            } else if (obj instanceof Dataset) {                Dataset ds = (Dataset) obj;                dataObjects.add(AdapterUtils.go(ds,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;    }