sclass StringClustersWithIDs { new L clusters; !include #1025301 // change()/onChange() sclass Cluster { GlobalID globalID = aGlobalIDObject(); Set synonyms = ciSet(); *() {} *(S s) { synonyms.add(s); } } L searchForCluster(S s) { ret filter(clusters, c -> contains(c.synonyms, s)); } void add(Cluster cluster) { clusters.add(cluster); change(); } // also adds to list Cluster newCluster(S s) { Cluster c = new(s); add(c); ret c; } // also adds to list Cluster newCluster(Cl synonyms) { new Cluster c; addAll(c.synonyms, synonyms); add(c); ret c; } }