DetectorNode earlier = addOrCreateDetectorNode(constraint.getEarlierDetector(), nodeMap, factoryMap); DetectorNode later = addOrCreateDetectorNode(constraint.getLaterDetector(), nodeMap, factoryMap);
DetectorNode earlier = addOrCreateDetectorNode( constraint.getEarlierDetector(), nodeMap, factoryMap, result); DetectorNode later = addOrCreateDetectorNode( constraint.getLaterDetector(), nodeMap, factoryMap, result);
	private ConstraintGraph buildConstraintGraph(		Map<String, DetectorFactory> factoryMap,		List<DetectorOrderingConstraint> constraintList) throws OrderingConstraintException {		ConstraintGraph result = new ConstraintGraph();		Map<String, DetectorNode> nodeMap = new HashMap<String, DetectorNode>();		for (Iterator<DetectorOrderingConstraint> i = constraintList.iterator(); i.hasNext(); ) {			DetectorOrderingConstraint constraint = i.next();			DetectorNode earlier =				addOrCreateDetectorNode(constraint.getEarlierDetector(), nodeMap, factoryMap);			DetectorNode later =				addOrCreateDetectorNode(constraint.getLaterDetector(), nodeMap, factoryMap);			result.addVertex(earlier);			result.addVertex(later);			// The constraints are specified such that the earlier detector node			// points to the later detector node.  When a topological sort is performed,			// the earlier detector will be ordered before the later detector.			result.createEdge(earlier, later);		}		return result;	}