for (Iterator<DetectorFactory> i = chosenSet.iterator(); i.hasNext();) { DetectorFactory factory = i.next();
for (DetectorFactory factory : chosenSet) {
	private Set<DetectorNode> addOrCreateDetectorNodes(			DetectorFactorySelector selector,			Map<String, DetectorNode> nodeMap,			Set<DetectorFactory> factorySet,			ConstraintGraph constraintGraph) throws OrderingConstraintException {		HashSet<DetectorNode> result = new HashSet<DetectorNode>();				Set<DetectorFactory> chosenSet = selectDetectors(selector, factorySet);				for (Iterator<DetectorFactory> i = chosenSet.iterator(); i.hasNext();) {			DetectorFactory factory = i.next();			DetectorNode node = addOrCreateDetectorNode(factory, nodeMap, constraintGraph);			result.add(node);		}		return result;	}