for (Iterator<DetectorNode> i = inDegreeZeroList.iterator(); i.hasNext(); ) { DetectorNode node = i.next();
for (DetectorNode node : inDegreeZeroList) {
	private void buildPassList(ConstraintGraph constraintGraph)			throws OrderingConstraintException {		while (constraintGraph.getNumVertices() > 0) {			List<DetectorNode> inDegreeZeroList = new LinkedList<DetectorNode>();			// Get all of the detectors nodes with in-degree 0.			// These have no unsatisfied prerequisites, and thus can			// be chosen for the current pass.			int inDegreeZeroCount = 0;			for (Iterator<DetectorNode> i = constraintGraph.vertexIterator(); i.hasNext(); ) {				DetectorNode node = i.next();				if (constraintGraph.getNumIncomingEdges(node) == 0) {					++inDegreeZeroCount;					inDegreeZeroList.add(node);				}			}			if (inDegreeZeroCount == 0)				throw new OrderingConstraintException("Cycle in inter-pass ordering constraints");			// Remove all of the chosen detectors from the constraint graph.			for (Iterator<DetectorNode> i = inDegreeZeroList.iterator(); i.hasNext(); ) {				DetectorNode node = i.next();				constraintGraph.removeVertex(node);			}			// Create analysis pass and add detector factories.			// Note that this just makes the detectors members of the pass:			// it doesn't assign them a position in the pass.			AnalysisPass pass = new AnalysisPass();			addPass(pass);			for (Iterator<DetectorNode> i = inDegreeZeroList.iterator(); i.hasNext(); ) {				DetectorNode node = i.next();				assignToPass(node.getFactory(), pass);			}		}	}