Search.SearchEntry[] entries = ((Search)valueObject).getSearchEntries(); MapSetStringKey key; for (int i=0; i<entries.length; i++){ key = new MapSetStringKey(entries[i].getId()); if (!children.containsKey(key)){ children.put(key, new SearchNode(entries[i]));
if (((Search)valueObject).isChanged()){ Search.SearchEntry[] entries = ( (Search) valueObject). getSearchEntries(); ((Search)valueObject).setChanged(false); MapSetStringKey key; for (int i = 0; i < entries.length; i++) { key = new MapSetStringKey(entries[i].getId()); if (!children.containsKey(key)) { children.put(key, new SearchNode(entries[i])); }
    public Object[] getChildren() {        if (type==ROOT_NODE){            if (children==null && ((Search)valueObject).getSearchEntries().length==0){                WaitNode[] waitNode = new WaitNode[1];                waitNode[0] = new WaitNode();                return waitNode;            }            if (children==null){                children = new HashMap();                Search.SearchEntry[] entries = ((Search)valueObject).getSearchEntries();                for (int i=0; i<entries.length; i++){                    children.put(new MapSetStringKey(entries[i].getId()), new SearchNode(entries[i]));                }            }            else{                Search.SearchEntry[] entries = ((Search)valueObject).getSearchEntries();                MapSetStringKey key;                for (int i=0; i<entries.length; i++){                    key = new MapSetStringKey(entries[i].getId());                    if (!children.containsKey(key)){                        children.put(key, new SearchNode(entries[i]));                    }                }            }            return (SearchNode[]) children.values().toArray(new SearchNode[children.size()]);        }        else if (type==ENTRY_NODE){            return ((Search.SearchEntry)valueObject).getFileNames();        }        else return null;    }