JTS Topology Suite - v 1.12

## com.vividsolutions.jts.planargraph
Class Node

    java.lang.Object
      com.vividsolutions.jts.planargraph.GraphComponent
          com.vividsolutions.jts.planargraph.Node

    public class Node

extends GraphComponent

A node in a `PlanarGraph`is a location where 0 or more `Edge`s meet. A node is connected to each of its incident Edges via an outgoing DirectedEdge. Some clients using a `PlanarGraph` may want to subclass `Node` to add their own application-specific data and methods.

Version:
  1.7

Field Summary
`protected DirectedEdgeStar` `deStar` The collection of DirectedEdges that leave this Node
`protected Coordinate` `pt` The location of this Node

Fields inherited from class com.vividsolutions.jts.planargraph.GraphComponent
`isMarked, isVisited`

Constructor Summary
`Node(Coordinate pt)` Constructs a Node with the given location.
`Node(Coordinate pt, DirectedEdgeStar deStar)` Constructs a Node with the given location and collection of outgoing DirectedEdges.

Method Summary
`void` `addOutEdge(DirectedEdge de)` Adds an outgoing DirectedEdge to this Node.
`Coordinate` `getCoordinate()` Returns the location of this Node.
`int` `getDegree()` Returns the number of edges around this Node.
`static java.util.Collection` `getEdgesBetween(Node node0, Node node1)` Returns all Edges that connect the two nodes (which are assumed to be different).
`int` `getIndex(Edge edge)` Returns the zero-based index of the given Edge, after sorting in ascending order by angle with the positive x-axis.
`DirectedEdgeStar` `getOutEdges()` Returns the collection of DirectedEdges that leave this Node.
`boolean` `isRemoved()` Tests whether this node has been removed from its containing graph
`void` `remove(DirectedEdge de)` Removes a `DirectedEdge` incident on this node.

Methods inherited from class com.vividsolutions.jts.planargraph.GraphComponent
`getComponentWithVisitedState, getContext, getData, isMarked, isVisited, setContext, setData, setMarked, setMarked, setVisited, setVisited`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### pt

    protected Coordinate pt

  The location of this Node

### deStar

    protected DirectedEdgeStar deStar

  The collection of DirectedEdges that leave this Node

Constructor Detail

### Node

    public Node(Coordinate pt)

  Constructs a Node with the given location.

### Node

    public Node(Coordinate pt,
                DirectedEdgeStar deStar)

  Constructs a Node with the given location and collection of outgoing DirectedEdges.

Method Detail

### getEdgesBetween

    public static java.util.Collection getEdgesBetween(Node node0,
                                                       Node node1)

  Returns all Edges that connect the two nodes (which are assumed to be different).

### getCoordinate

    public Coordinate getCoordinate()

  Returns the location of this Node.

### addOutEdge

    public void addOutEdge(DirectedEdge de)

  Adds an outgoing DirectedEdge to this Node.

### getOutEdges

    public DirectedEdgeStar getOutEdges()

  Returns the collection of DirectedEdges that leave this Node.

### getDegree

    public int getDegree()

  Returns the number of edges around this Node.

### getIndex

    public int getIndex(Edge edge)

  Returns the zero-based index of the given Edge, after sorting in ascending order by angle with the positive x-axis.

### remove

    public void remove(DirectedEdge de)

  Removes a `DirectedEdge` incident on this node. Does not change the state of the directed edge.

### isRemoved

    public boolean isRemoved()

  Tests whether this node has been removed from its containing graph

  Specified by:
    `isRemoved` in class `GraphComponent`
  Returns:
    `true` if this node is removed

JTS Topology Suite - v 1.12