for (Iterator<AnalysisPass> i = passList.iterator(); i.hasNext(); ) { AnalysisPass pass = i.next();
for (AnalysisPass pass : passList) {
	public void build() throws OrderingConstraintException {		// Build inter-pass constraint graph		Map<String, DetectorNode> nodeMap = new HashMap<String, DetectorNode>();		ConstraintGraph interPassConstraintGraph = buildConstraintGraph(			nodeMap,			new HashSet<DetectorFactory>(factoryMap.values()),			interPassConstraintList);		if (DEBUG) System.out.println(interPassConstraintGraph.getNumVertices() +			" nodes in inter-pass constraint graph");		// Build list of analysis passes.		// This will assign all detectors referenced in inter- or intra-pass		// ordering constraints to passes.  Detectors with any ordering		// constraint will be left unassigned.		buildPassList(interPassConstraintGraph);		// Sort each pass by intra-pass ordering constraints.		// This may assign some previously unassigned detectors to passes.		for (Iterator<AnalysisPass> i = passList.iterator(); i.hasNext(); ) {			AnalysisPass pass = i.next();			sortPass(intraPassConstraintList, factoryMap, pass);		}				// If there are any unassigned detectors remaining,		// add them to the final pass.		if (factoryMap.size() > assignedToPassSet.size()) {			AnalysisPass lastPass;			if (passList.isEmpty()) {				lastPass = new AnalysisPass();				addPass(lastPass);			} else {				lastPass = passList.getLast();			}						Set<DetectorFactory> unassignedSet = getUnassignedSet();			for (DetectorFactory factory : unassignedSet) {				assignToPass(factory, lastPass);			}			appendDetectorsToPass(unassignedSet, lastPass);		}	}