Class NodeMap

java.lang.Object
org.locationtech.jts.planargraph.NodeMap

public class NodeMap extends Object
A map of Nodes, indexed by the coordinate of the node.
Version:
1.7
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private Map
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a NodeMap without any Nodes.
  • Method Summary

    Modifier and Type
    Method
    Description
    add(Node n)
    Adds a node to the map, replacing any that is already at that location.
    Returns the Node at the given location, or null if no Node was there.
    Returns an Iterator over the Nodes in this NodeMap, sorted in ascending order by angle with the positive x-axis.
    Removes the Node at the given location, and returns it (or null if no Node was there).
    Returns the Nodes in this NodeMap, sorted in ascending order by angle with the positive x-axis.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • nodeMap

      private Map nodeMap
  • Constructor Details

    • NodeMap

      public NodeMap()
      Constructs a NodeMap without any Nodes.
  • Method Details

    • 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 Iterator iterator()
      Returns an Iterator over the Nodes in this NodeMap, sorted in ascending order by angle with the positive x-axis.
    • values

      public Collection values()
      Returns the Nodes in this NodeMap, sorted in ascending order by angle with the positive x-axis.