com.vividsolutions.jts.planargraph
Class Subgraph
java.lang.Object
com.vividsolutions.jts.planargraph.Subgraph
public class Subgraph
extends java.lang.Object
A subgraph of a
PlanarGraph
.
A subgraph may contain any subset of
Edges
from the parent graph.
It will also automatically contain all
DirectedEdge
s
and
Node
s associated with those edges.
No new objects are created when edges are added -
all associated components must already exist in the parent graph.
dirEdges
protected List dirEdges
Subgraph
public Subgraph(PlanarGraph parentGraph)
parentGraph
- the parent graph
add
public void add(Edge e)
contains
public boolean contains(Edge e)
Tests whether an
Edge
is contained in this subgraph
true
if the edge is contained in this subgraph
dirEdgeIterator
public Iterator dirEdgeIterator()
Returns an
Iterator
over the
DirectedEdge
s in this graph,
in the order in which they were added.
- an iterator over the directed edges
edgeIterator
public Iterator edgeIterator()
Returns an
Iterator
over the
Edge
s in this graph,
in the order in which they were added.
- an iterator over the edges
nodeIterator
public Iterator nodeIterator()
Returns an Iterator
over the Nodes
in this graph.
- an iterator over the nodes