static L findBackRefs(Collection concepts, Class type) { new IdentityHashMap l; for (Concept c : concepts) if (c.backRefs != null) for (Concept.Ref r : c.backRefs) if (instanceOf(r.concept(), type)) l.put((A) r.concept(), true); ret asList(keys(l)); } // TODO: sort by ID? static L findBackRefs(Concept c, Class type) { new IdentityHashMap l; if (c.backRefs != null) for (Concept.Ref r : c.backRefs) if (instanceOf(r.concept(), type)) l.put((A) r.concept(), true); ret asList(keys(l)); } static L findBackRefs(Class type, Concept c) { ret findBackRefs(c, type); }