Map<String, Set<String>> map = new HashMap<String, Set<String>>();
while (iter.hasNext()) {
Object o = (Object) iter.next();
if (o instanceof Subsumption) {
Subsumption s = (Subsumption) o;
if (map.containsKey(s.getLeft().getRuleName())) {
Set<String> set = map.get(s.getLeft().getRuleName());
set.add(s.getRight().getRuleName());
} else {
Set<String> set = new HashSet<String>();
set.add(s.getRight().getRuleName());
map.put(s.getLeft().getRuleName(), set);
}
}
}
return map;