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 MacroscopicLink
deepClone()
Deep copy, non-owned members are reference copieddefault MacroscopicLinkSegment
getLinkSegment(boolean directionAb)
collect edgeSegment as something extending LinkSegment which is to be expected for any link.default MacroscopicLinkSegment
getLinkSegmentAb()
collect edgeSegment Ab as something extending LinkSegment which is to be expected for any link.default MacroscopicLinkSegment
getLinkSegmentBa()
collect edgeSegment Ba as something extending LinkSegment which is to be expected for any link.default MacroscopicLinkSegment
getLinkSegmentIfLinkIsOneWayForMode(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 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 resultdefault 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 resultMacroscopicLink
shallowClone()
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:
getLinkSegment
in 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:
getLinkSegmentAb
in 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:
getLinkSegmentBa
in interfaceLink
- Returns:
- link segment in given direction
-
getLinkSegments
default Collection<? extends MacroscopicLinkSegment> getLinkSegments()
collect all available link segments of this link- Specified by:
getLinkSegments
in 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:
shallowClone
in interfaceDirectedEdge
- Specified by:
shallowClone
in interfaceEdge
- Specified by:
shallowClone
in interfaceGraphEntity
- Specified by:
shallowClone
in interfaceIdAble
- Specified by:
shallowClone
in interfaceLink
- Returns:
- copy of this edge
-
deepClone
MacroscopicLink 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
- Specified by:
deepClone
in interfaceLink
- Returns:
- copy of this edge
-
-