Package org.meteoinfo.jts.planargraph
Class NodeMap
- java.lang.Object
-
- org.meteoinfo.jts.planargraph.NodeMap
-
public class NodeMap extends java.lang.ObjectA map ofNodes, indexed by the coordinate of the node.
-
-
Constructor Summary
Constructors Constructor Description NodeMap()Constructs a NodeMap without any Nodes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Nodeadd(Node n)Adds a node to the map, replacing any that is already at that location.Nodefind(Coordinate coord)Returns the Node at the given location, or null if no Node was there.java.util.Iteratoriterator()Returns an Iterator over the Nodes in this NodeMap, sorted in ascending order by angle with the positive x-axis.Noderemove(Coordinate pt)Removes the Node at the given location, and returns it (or null if no Node was there).java.util.Collectionvalues()Returns the Nodes in this NodeMap, sorted in ascending order by angle with the positive x-axis.
-
-
-
Method Detail
-
add
public Node add(Node n)
Adds a node to the map, replacing any that is already at that location.- Returns:
- the added node
-
remove
public Node remove(Coordinate pt)
Removes the Node at the given location, and returns it (or null if no Node was there).
-
find
public Node find(Coordinate coord)
Returns the Node at the given location, or null if no Node was there.
-
iterator
public java.util.Iterator iterator()
Returns an Iterator over the Nodes in this NodeMap, sorted in ascending order by angle with the positive x-axis.
-
values
public java.util.Collection values()
Returns the Nodes in this NodeMap, sorted in ascending order by angle with the positive x-axis.
-
-