CollectionFactory.ARRAYLIST_FACTORY);
contractedReferentialDigraph = new MapDigraph(MapDigraph.HASHMAP_FACTORY);
contractor.contract(
contractedReferentialDigraph,
CollectionFactory.ARRAYLIST_FACTORY);
IndegreeTopologicalSort sorter = new IndegreeTopologicalSort(
contractedReferentialDigraph);
components = new HashMap(contractedReferentialDigraph.order());
int componentIndex = 0;
while (sorter.hasNext()) {
Collection component = (Collection) sorter.next();
ComponentRecord rec = new ComponentRecord(componentIndex++, component);
for (Iterator i = component.iterator(); i.hasNext();) {
components.put(i.next(), rec);
}
}