Package org.locationtech.jts.planargraph
Class DirectedEdgeStar
- java.lang.Object
-
- org.locationtech.jts.planargraph.DirectedEdgeStar
-
public class DirectedEdgeStar extends Object
- Version:
- 1.7
-
-
Constructor Summary
Constructors Constructor Description DirectedEdgeStar()Constructs a DirectedEdgeStar with no edges.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(DirectedEdge de)Adds a new member to this DirectedEdgeStar.CoordinategetCoordinate()Returns the coordinate for the node at which this star is basedintgetDegree()Returns the number of edges around the Node associated with this DirectedEdgeStar.ListgetEdges()Returns the DirectedEdges, in ascending order by angle with the positive x-axis.intgetIndex(int i)Returns value of i modulo the number of edges in this DirectedEdgeStar (i.e.intgetIndex(DirectedEdge dirEdge)Returns the zero-based index of the given DirectedEdge, after sorting in ascending order by angle with the positive x-axis.intgetIndex(Edge edge)Returns the zero-based index of the given Edge, after sorting in ascending order by angle with the positive x-axis.DirectedEdgegetNextCWEdge(DirectedEdge dirEdge)Returns theDirectedEdgeon the right-hand (CW) side of the givenDirectedEdge(which must be a member of this DirectedEdgeStar).DirectedEdgegetNextEdge(DirectedEdge dirEdge)Returns theDirectedEdgeon the left-hand (CCW) side of the givenDirectedEdge(which must be a member of this DirectedEdgeStar).Iteratoriterator()Returns an Iterator over the DirectedEdges, in ascending order by angle with the positive x-axis.voidremove(DirectedEdge de)Drops a member of this DirectedEdgeStar.
-
-
-
Field Detail
-
outEdges
protected List outEdges
The underlying list of outgoing DirectedEdges
-
-
Method Detail
-
add
public void add(DirectedEdge de)
Adds a new member to this DirectedEdgeStar.
-
remove
public void remove(DirectedEdge de)
Drops a member of this DirectedEdgeStar.
-
iterator
public Iterator iterator()
Returns an Iterator over the DirectedEdges, in ascending order by angle with the positive x-axis.
-
getDegree
public int getDegree()
Returns the number of edges around the Node associated with this DirectedEdgeStar.
-
getCoordinate
public Coordinate getCoordinate()
Returns the coordinate for the node at which this star is based
-
getEdges
public List getEdges()
Returns the DirectedEdges, in ascending order by angle with the positive x-axis.
-
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.
-
getIndex
public int getIndex(DirectedEdge dirEdge)
Returns the zero-based index of the given DirectedEdge, after sorting in ascending order by angle with the positive x-axis.
-
getIndex
public int getIndex(int i)
Returns value of i modulo the number of edges in this DirectedEdgeStar (i.e. the remainder when i is divided by the number of edges)- Parameters:
i- an integer (positive, negative or zero)
-
getNextEdge
public DirectedEdge getNextEdge(DirectedEdge dirEdge)
Returns theDirectedEdgeon the left-hand (CCW) side of the givenDirectedEdge(which must be a member of this DirectedEdgeStar).
-
getNextCWEdge
public DirectedEdge getNextCWEdge(DirectedEdge dirEdge)
Returns theDirectedEdgeon the right-hand (CW) side of the givenDirectedEdge(which must be a member of this DirectedEdgeStar).
-
-