com.vividsolutions.jts.geomgraph

Class EdgeEndStar

Known Direct Subclasses:
DirectedEdgeStar, EdgeEndBundleStar

public abstract class EdgeEndStar
extends java.lang.Object

A EdgeEndStar is an ordered list of EdgeEnds around a node. They are maintained in CCW order (starting with the positive x-axis) around the node for efficient lookup and topology building.
Version:
1.7

Field Summary

protected List
edgeList
A list of all outgoing edges in the result, in CCW order
protected Map
edgeMap
A map which maintains the edges in sorted order around the node

Constructor Summary

EdgeEndStar()

Method Summary

void
computeLabelling(GeometryGraph[] geom)
int
findIndex(EdgeEnd eSearch)
Coordinate
getCoordinate()
int
getDegree()
List
getEdges()
EdgeEnd
getNextCW(EdgeEnd ee)
abstract void
insert(EdgeEnd e)
Insert a EdgeEnd into this EdgeEndStar
protected void
insertEdgeEnd(EdgeEnd e, Object obj)
Insert an EdgeEnd into the map, and clear the edgeList cache, since the list of edges has now changed
boolean
isAreaLabelsConsistent()
Iterator
iterator()
Iterator access to the ordered list of edges is optimized by copying the map collection to a list.
void
print(PrintStream out)

Field Details

edgeList

protected List edgeList
A list of all outgoing edges in the result, in CCW order

edgeMap

protected Map edgeMap
A map which maintains the edges in sorted order around the node

Constructor Details

EdgeEndStar

public EdgeEndStar()

Method Details

computeLabelling

public void computeLabelling(GeometryGraph[] geom)

findIndex

public int findIndex(EdgeEnd eSearch)

getCoordinate

public Coordinate getCoordinate()
Returns:
the coordinate for the node this star is based at

getDegree

public int getDegree()

getEdges

public List getEdges()

getNextCW

public EdgeEnd getNextCW(EdgeEnd ee)

insert

public abstract void insert(EdgeEnd e)
Insert a EdgeEnd into this EdgeEndStar

insertEdgeEnd

protected void insertEdgeEnd(EdgeEnd e,
                             Object obj)
Insert an EdgeEnd into the map, and clear the edgeList cache, since the list of edges has now changed

isAreaLabelsConsistent

public boolean isAreaLabelsConsistent()

iterator

public Iterator iterator()
Iterator access to the ordered list of edges is optimized by copying the map collection to a list. (This assumes that once an iterator is requested, it is likely that insertion into the map is complete).

print

public void print(PrintStream out)