private void BuildSubgraphs(ArrayList subgraphList, PolygonBuilder polyBuilder) { //for (Iterator i = subgraphList.iterator(); i.hasNext(); ) foreach (object obj in subgraphList) { BufferSubgraph subgraph = (BufferSubgraph)obj; Coordinate p = subgraph.GetRightmostCoordinate(); int outsideDepth = 0; if (polyBuilder.ContainsPoint(p)) { outsideDepth = 1; } subgraph.ComputeDepth(outsideDepth); subgraph.FindResultEdges(); polyBuilder.Add(subgraph.GetDirectedEdges(), subgraph.GetNodes()); } }