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 ConjugateDirectedEdgedeepClone()Deep copy, non-owned members are reference copieddefault ConjugateEdgeSegmentgetEdgeSegment(boolean directionAb)Edge segment in the direction indicatedConjugateEdgeSegmentgetEdgeSegmentAb()Edge segment in the direction from A to BConjugateEdgeSegmentgetEdgeSegmentBa()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 forConjugateDirectedVertexgetVertexA()Vertex A of the edgeConjugateDirectedVertexgetVertexB()Vertex B of the edgeConjugateEdgeSegmentregisterEdgeSegment(EdgeSegment edgeSegment, boolean directionAB, boolean force)Register EdgeSegment.ConjugateEdgeSegmentremoveEdgeSegmentAb()Remove edge segmentAb from this edge.ConjugateEdgeSegmentremoveEdgeSegmentBa()Remove edge segmentAb from this edge.ConjugateDirectedEdgeshallowClone()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:
getVertexAin interfaceDirectedEdge- Specified by:
getVertexAin interfaceEdge- Returns:
- vertex A
-
getVertexB
ConjugateDirectedVertex getVertexB()
Vertex B of the edge- Specified by:
getVertexBin interfaceDirectedEdge- Specified by:
getVertexBin 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:
registerEdgeSegmentin 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:
removeEdgeSegmentAbin 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:
removeEdgeSegmentBain interfaceDirectedEdge- Returns:
- removed edge segment
-
getEdgeSegmentAb
ConjugateEdgeSegment getEdgeSegmentAb()
Edge segment in the direction from A to B- Specified by:
getEdgeSegmentAbin interfaceDirectedEdge- Returns:
- edge segment AB
-
getEdgeSegmentBa
ConjugateEdgeSegment getEdgeSegmentBa()
Edge segment in the direction from B to A- Specified by:
getEdgeSegmentBain interfaceDirectedEdge- Returns:
- edge segment BA
-
shallowClone
ConjugateDirectedEdge shallowClone()
Shallow copy- Specified by:
shallowClonein interfaceDirectedEdge- Specified by:
shallowClonein interfaceEdge- Specified by:
shallowClonein interfaceGraphEntity- Specified by:
shallowClonein interfaceIdAble- Returns:
- copy of this edge
-
deepClone
ConjugateDirectedEdge deepClone()
Deep copy, non-owned members are reference copied- Specified by:
deepClonein interfaceDirectedEdge- Specified by:
deepClonein interfaceEdge- Specified by:
deepClonein interfaceGraphEntity- Specified by:
deepClonein interfaceIdAble- Returns:
- copy of this edge
-
getEdgeSegment
default ConjugateEdgeSegment getEdgeSegment(boolean directionAb)
Edge segment in the direction indicated- Specified by:
getEdgeSegmentin 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:
getEdgeSegmentsin 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)
-
-