!7 // not synchronized sclass WebThoughtSpace { S globalID; class Webs extends NotifyingList { *() { super(new L); } *(L l) { super(l); } void change() { if (index != null) { print("Clearing index"); index = null; } } public synchronized L subList(int i, int j) { ret new Webs(list.subList(i, j)); } } new Webs webs; transient MultiMap index; *() {} *(Web... webs) { addAll(this.webs, webs); } void addWeb(Web web) { webs.add(web); } L indexedNodes(S query) { if (index == null) index = ai_indexWebs(webs); ret index.get(query); } } p { new WebThoughtSpace space; printStruct(space); space.addWeb(webFromTriple("love", "is", "nice")); printStruct(space.indexedNodes("LOVE")); printStruct(space.indexedNodes("WOOT")); }