6970717273747576777879
/** * This method expects that a node has a coordinate value. */ public Node addNode(Coordinate coord) { Node node = (Node) nodeMap.get(coord); if (node == null) { node = nodeFact.createNode(coord); nodeMap.put(coord, node); } return node;
79808182838485868788899091
return node; } public Node addNode(Node n) { Node node = (Node) nodeMap.get(n.getCoordinate()); if (node == null) { nodeMap.put(n.getCoordinate(), n); return n; } node.mergeLabel(n); return node; }
96979899100101102103
* Adds the EdgeEnd to the (possibly new) node. */ public void add(EdgeEnd e) { Coordinate p = e.getCoordinate(); Node n = addNode(p); n.add(e); }
117118119120121122123124125126127
public Collection getBoundaryNodes(int geomIndex) { Collection bdyNodes = new ArrayList(); for (Iterator i = iterator(); i.hasNext(); ) { Node node = (Node) i.next(); if (node.getLabel().getLocation(geomIndex) == Location.BOUNDARY) bdyNodes.add(node); } return bdyNodes; }
128129130131132133134135136
public void print(PrintStream out) { for (Iterator it = iterator(); it.hasNext(); ) { Node n = (Node) it.next(); n.print(out); } }