Interface MacroscopicLink
-
- All Superinterfaces:
Comparable<IdAble>,DirectedEdge,Edge,ExternalIdAble,GraphEntity,IdAble,Link,ManagedId,Serializable
- All Known Implementing Classes:
MacroscopicLinkImpl
public interface MacroscopicLink extends Link
Macroscopic Link interface which extends the Link interface with additional mode specific functionality- Author:
- markr
-
-
Field Summary
-
Fields inherited from interface org.goplanit.utils.graph.Edge
EDGE_ID_CLASS
-
Fields inherited from interface org.goplanit.utils.network.layer.physical.Link
LINK_ID_CLASS
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description MacroscopicLinkdeepClone()Deep copy, non-owned members are reference copieddefault MacroscopicLinkSegmentgetLinkSegment(boolean directionAb)collect edgeSegment as something extending LinkSegment which is to be expected for any link.default MacroscopicLinkSegmentgetLinkSegmentAb()collect edgeSegment Ab as something extending LinkSegment which is to be expected for any link.default MacroscopicLinkSegmentgetLinkSegmentBa()collect edgeSegment Ba as something extending LinkSegment which is to be expected for any link.default MacroscopicLinkSegmentgetLinkSegmentIfLinkIsOneWayForMode(Mode mode)Collect the one way link segment for the mode if the link is in fact one way.default Collection<? extends MacroscopicLinkSegment>getLinkSegments()collect all available link segments of this linkdefault booleanisModeAllowedOnAllSegments(Mode mode)Verify if given mode is allowed on both segments, where at least one segment must be registered to allow for a positive resultdefault booleanisModeAllowedOnAnySegment(Mode mode)Verify if given mode is allowed on any of the two segments, where at least one segment must be registered to allow for a positive resultMacroscopicLinkshallowClone()Shallow copy-
Methods inherited from interface org.goplanit.utils.graph.directed.DirectedEdge
forEachSegment, getEdgeSegment, getEdgeSegmentAb, getEdgeSegmentBa, getEdgeSegments, getVertexA, getVertexB, hasEdgeSegment, hasEdgeSegmentAb, hasEdgeSegmentBa, registerEdgeSegment, registerEdgeSegment, removeEdgeSegment, removeEdgeSegmentAb, removeEdgeSegmentBa, removeEdgeSegments, replace
-
Methods inherited from interface org.goplanit.utils.graph.Edge
addInputProperty, createEnvelope, getGeometry, getIdClass, getInputProperty, getLengthKm, getName, hasGeometry, 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.network.layer.physical.Link
getLinkId, getLinkIdClass, getNodeA, getNodeB, hasLinkSegmentAb, hasLinkSegmentBa, hasName
-
Methods inherited from interface org.goplanit.utils.id.ManagedId
recreateManagedIds, resetChildManagedIdEntities
-
-
-
-
Method Detail
-
getLinkSegment
default MacroscopicLinkSegment getLinkSegment(boolean directionAb)
collect edgeSegment as something extending LinkSegment which is to be expected for any link. Convenience method for readability- Specified by:
getLinkSegmentin interfaceLink- Parameters:
directionAb- the direction- Returns:
- link segment in given direction
-
getLinkSegmentAb
default MacroscopicLinkSegment getLinkSegmentAb()
collect edgeSegment Ab as something extending LinkSegment which is to be expected for any link. Convenience method for readability- Specified by:
getLinkSegmentAbin interfaceLink- Returns:
- link segment in given direction
-
getLinkSegmentBa
default MacroscopicLinkSegment getLinkSegmentBa()
collect edgeSegment Ba as something extending LinkSegment which is to be expected for any link. Convenience method for readability- Specified by:
getLinkSegmentBain interfaceLink- Returns:
- link segment in given direction
-
getLinkSegments
default Collection<? extends MacroscopicLinkSegment> getLinkSegments()
collect all available link segments of this link- Specified by:
getLinkSegmentsin interfaceLink- Returns:
- available link segments
-
isModeAllowedOnAnySegment
default boolean isModeAllowedOnAnySegment(Mode mode)
Verify if given mode is allowed on any of the two segments, where at least one segment must be registered to allow for a positive result- Parameters:
mode- to check- Returns:
- true when a segment allows the mode, false otherwise
-
isModeAllowedOnAllSegments
default boolean isModeAllowedOnAllSegments(Mode mode)
Verify if given mode is allowed on both segments, where at least one segment must be registered to allow for a positive result- Parameters:
mode- to check- Returns:
- true both segments allow the mode, false otherwise
-
getLinkSegmentIfLinkIsOneWayForMode
default MacroscopicLinkSegment getLinkSegmentIfLinkIsOneWayForMode(Mode mode)
Collect the one way link segment for the mode if the link is in fact one way. If it is not (for the mode), null is returned- Parameters:
mode- to check one-way characteristic- Returns:
- edge segment that is one way for the mode, i.e., the other edge segment (if any) does not support this mode, null if this is not the case
-
shallowClone
MacroscopicLink shallowClone()
Shallow copy- Specified by:
shallowClonein interfaceDirectedEdge- Specified by:
shallowClonein interfaceEdge- Specified by:
shallowClonein interfaceGraphEntity- Specified by:
shallowClonein interfaceIdAble- Specified by:
shallowClonein interfaceLink- Returns:
- copy of this edge
-
deepClone
MacroscopicLink 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- Specified by:
deepClonein interfaceLink- Returns:
- copy of this edge
-
-