Interface ConjugateDirectedEdge
-
- All Superinterfaces:
Comparable<IdAble>
,DirectedEdge
,Edge
,ExternalIdAble
,GraphEntity
,IdAble
,ManagedId
,Serializable
- All Known Subinterfaces:
ConjugateConnectoidEdge
,ConjugateLink
- All Known Implementing Classes:
ConjugateConnectoidEdgeImpl
,ConjugateDirectedEdgeImpl
,ConjugateLinkImpl
public interface ConjugateDirectedEdge extends DirectedEdge
Directed Edge interface connecting two vertices in a directional fashion. Each edge has one or two underlying edge segments in a particular direction which may carry additional information for each particular direction of the edge.- Author:
- markr
-
-
Field Summary
-
Fields inherited from interface org.goplanit.utils.graph.Edge
EDGE_ID_CLASS
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ConjugateDirectedEdge
deepClone()
Deep copy, non-owned members are reference copieddefault ConjugateEdgeSegment
getEdgeSegment(boolean directionAb)
Edge segment in the direction indicatedConjugateEdgeSegment
getEdgeSegmentAb()
Edge segment in the direction from A to BConjugateEdgeSegment
getEdgeSegmentBa()
Edge segment in the direction from B to Adefault Collection<? extends ConjugateEdgeSegment>
getEdgeSegments()
collect all edge segments available on the edgePair<? extends DirectedEdge,? extends DirectedEdge>
getOriginalAdjacentEdges()
Conjugate edge represents two adjacent edges in original form (potential turn movement).default Pair<? extends EdgeSegment,? extends EdgeSegment>
getOriginalAdjacentEdgeSegments(boolean directionAb)
Collect original pair of edge segments that this conjugate in given direction makes up forConjugateDirectedVertex
getVertexA()
Vertex A of the edgeConjugateDirectedVertex
getVertexB()
Vertex B of the edgeConjugateEdgeSegment
registerEdgeSegment(EdgeSegment edgeSegment, boolean directionAB, boolean force)
Register EdgeSegment.ConjugateEdgeSegment
removeEdgeSegmentAb()
Remove edge segmentAb from this edge.ConjugateEdgeSegment
removeEdgeSegmentBa()
Remove edge segmentAb from this edge.ConjugateDirectedEdge
shallowClone()
Shallow copy-
Methods inherited from interface org.goplanit.utils.graph.directed.DirectedEdge
forEachSegment, hasEdgeSegment, hasEdgeSegmentAb, hasEdgeSegmentBa, registerEdgeSegment, removeEdgeSegment, removeEdgeSegments, replace
-
Methods inherited from interface org.goplanit.utils.graph.Edge
addInputProperty, createEnvelope, getGeometry, getIdClass, getInputProperty, getLengthKm, getName, hasGeometry, hasName, hasVertex, hasVertexA, hasVertexB, hasVertices, isGeometryInAbDirection, isGeometryInAbDirection, isVertexA, populateBasicGeometry, removeVertex, replace, setGeometry, setLengthKm, setName, transformGeometry, updateGeometryInjectCoordinateAtProjectedLocation, validate
-
Methods inherited from interface org.goplanit.utils.id.ExternalIdAble
appendExternalId, appendExternalId, getExternalId, getIdsAsString, getSplitExternalId, getSplitExternalId, getXmlId, hasExternalId, hasXmlId, setExternalId, setXmlId, setXmlId
-
Methods inherited from interface org.goplanit.utils.id.IdAble
compareTo, getId, idEquals, idHashCode
-
Methods inherited from interface org.goplanit.utils.id.ManagedId
recreateManagedIds, resetChildManagedIdEntities
-
-
-
-
Method Detail
-
getVertexA
ConjugateDirectedVertex getVertexA()
Vertex A of the edge- Specified by:
getVertexA
in interfaceDirectedEdge
- Specified by:
getVertexA
in interfaceEdge
- Returns:
- vertex A
-
getVertexB
ConjugateDirectedVertex getVertexB()
Vertex B of the edge- Specified by:
getVertexB
in interfaceDirectedEdge
- Specified by:
getVertexB
in interfaceEdge
- Returns:
- vertex B
-
registerEdgeSegment
ConjugateEdgeSegment registerEdgeSegment(EdgeSegment edgeSegment, boolean directionAB, boolean force)
Register EdgeSegment. If there already exists an edgeSegment for that direction it is replaced and returned. If the edge segment has no parent edge, this edge is set. If there is a discrepancy between the edge segment's parent edge and this edge a warning is issued and the edge segment is not registered- Specified by:
registerEdgeSegment
in interfaceDirectedEdge
- Parameters:
edgeSegment
- the edgeSegment to be registereddirectionAB
- direction of travelforce
- when true the provided edge segment is always set (even if null or inconsistent, without warning)- Returns:
- replaced egeSegment (if any)
-
removeEdgeSegmentAb
ConjugateEdgeSegment removeEdgeSegmentAb()
Remove edge segmentAb from this edge. Be careful doing this as it because it might affect the contiguous ids if the edge segment is garbage collected- Specified by:
removeEdgeSegmentAb
in interfaceDirectedEdge
- Returns:
- removed edge segment
-
removeEdgeSegmentBa
ConjugateEdgeSegment removeEdgeSegmentBa()
Remove edge segmentAb from this edge. Be careful doing this as it because it might affect the contiguous ids if the edge segment is garbage collected- Specified by:
removeEdgeSegmentBa
in interfaceDirectedEdge
- Returns:
- removed edge segment
-
getEdgeSegmentAb
ConjugateEdgeSegment getEdgeSegmentAb()
Edge segment in the direction from A to B- Specified by:
getEdgeSegmentAb
in interfaceDirectedEdge
- Returns:
- edge segment AB
-
getEdgeSegmentBa
ConjugateEdgeSegment getEdgeSegmentBa()
Edge segment in the direction from B to A- Specified by:
getEdgeSegmentBa
in interfaceDirectedEdge
- Returns:
- edge segment BA
-
shallowClone
ConjugateDirectedEdge shallowClone()
Shallow copy- Specified by:
shallowClone
in interfaceDirectedEdge
- Specified by:
shallowClone
in interfaceEdge
- Specified by:
shallowClone
in interfaceGraphEntity
- Specified by:
shallowClone
in interfaceIdAble
- Returns:
- copy of this edge
-
deepClone
ConjugateDirectedEdge deepClone()
Deep copy, non-owned members are reference copied- Specified by:
deepClone
in interfaceDirectedEdge
- Specified by:
deepClone
in interfaceEdge
- Specified by:
deepClone
in interfaceGraphEntity
- Specified by:
deepClone
in interfaceIdAble
- Returns:
- copy of this edge
-
getEdgeSegment
default ConjugateEdgeSegment getEdgeSegment(boolean directionAb)
Edge segment in the direction indicated- Specified by:
getEdgeSegment
in interfaceDirectedEdge
- Parameters:
directionAb
- direction of segment- Returns:
- edge segment if present
-
getEdgeSegments
default Collection<? extends ConjugateEdgeSegment> getEdgeSegments()
collect all edge segments available on the edge- Specified by:
getEdgeSegments
in interfaceDirectedEdge
- Returns:
- available edge segments
-
getOriginalAdjacentEdges
Pair<? extends DirectedEdge,? extends DirectedEdge> getOriginalAdjacentEdges()
Conjugate edge represents two adjacent edges in original form (potential turn movement).- Returns:
- directed original adjacent edge pair
-
getOriginalAdjacentEdgeSegments
default Pair<? extends EdgeSegment,? extends EdgeSegment> getOriginalAdjacentEdgeSegments(boolean directionAb)
Collect original pair of edge segments that this conjugate in given direction makes up for- Parameters:
directionAb
- conjugate direction to use- Returns:
- pair of original edge segments (can be partially empty/null if combination does not exist)
-
-