Class MacroscopicLinkImpl<N extends DirectedVertex,LS extends MacroscopicLinkSegment>
- java.lang.Object
-
- org.goplanit.utils.id.IdAbleImpl
-
- org.goplanit.utils.id.ExternalIdAbleImpl
-
- org.goplanit.graph.GraphEntityImpl
-
- org.goplanit.graph.EdgeImpl<V>
-
- org.goplanit.graph.directed.DirectedEdgeImpl<N,LS>
-
- org.goplanit.network.layer.physical.LinkImpl<N,LS>
-
- org.goplanit.network.layer.macroscopic.MacroscopicLinkImpl<N,LS>
-
- All Implemented Interfaces:
Serializable,Comparable<IdAble>,DirectedEdge,Edge,GraphEntity,ExternalIdAble,IdAble,ManagedId,MacroscopicLink,Link
public class MacroscopicLinkImpl<N extends DirectedVertex,LS extends MacroscopicLinkSegment> extends LinkImpl<N,LS> implements MacroscopicLink
Link class connecting two nodes via some geometry. Each link has one or two underlying link segments in a particular direction which may carry additional information for each particular direction of the link.- Author:
- markr
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.goplanit.graph.EdgeImpl
inputProperties, lengthInKm, lineGeometry, name
-
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
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedMacroscopicLinkImpl(MacroscopicLinkImpl<N,LS> other, boolean deepCopy)Copy constructorprotectedMacroscopicLinkImpl(IdGroupingToken groupId, N nodeA, N nodeB)Constructor which injects link length directlyprotectedMacroscopicLinkImpl(IdGroupingToken groupId, N nodeA, N nodeB, double length)Constructor which injects link length directly
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MacroscopicLinkImpl<N,LS>deepClone()An id entity should always support a deep copy, i.e., all "owned" members will be deep copied when a clone of this instance is created via this call.MacroscopicLinkImpl<N,LS>shallowClone()Create a shallow copy of this entity-
Methods inherited from class org.goplanit.network.layer.physical.LinkImpl
generateLinkId, getLinkId, recreateLinkId, recreateManagedIds, setLinkId, validate
-
Methods inherited from class org.goplanit.graph.directed.DirectedEdgeImpl
getEdgeSegmentAb, getEdgeSegmentBa, registerEdgeSegment, removeEdgeSegmentAb, removeEdgeSegmentBa, replace, setEdgeSegmentAb, setEdgeSegmentBa
-
Methods inherited from class org.goplanit.graph.EdgeImpl
addInputProperty, getGeometry, getInputProperty, getLengthKm, getName, getVertexA, getVertexB, removeVertex, removeVertexA, removeVertexB, replace, setGeometry, setLengthKm, setName, setVertexA, setVertexB
-
Methods inherited from class org.goplanit.graph.GraphEntityImpl
generateAndSetId, generateId, toString
-
Methods inherited from class org.goplanit.utils.id.ExternalIdAbleImpl
getExternalId, getXmlId, setExternalId, setXmlId
-
Methods inherited from class org.goplanit.utils.id.IdAbleImpl
equals, generateAndSetId, getId, hashCode, setId
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
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.network.layer.macroscopic.MacroscopicLink
getLinkSegment, getLinkSegmentAb, getLinkSegmentBa, getLinkSegmentIfLinkIsOneWayForMode, getLinkSegments, isModeAllowedOnAllSegments, isModeAllowedOnAnySegment
-
Methods inherited from interface org.goplanit.utils.id.ManagedId
recreateManagedIds, resetChildManagedIdEntities
-
-
-
-
Constructor Detail
-
MacroscopicLinkImpl
protected MacroscopicLinkImpl(MacroscopicLinkImpl<N,LS> other, boolean deepCopy)
Copy constructor- Parameters:
other- to copydeepCopy- when true, create a deep copy, shallow copy otherwise
-
MacroscopicLinkImpl
protected MacroscopicLinkImpl(IdGroupingToken groupId, N nodeA, N nodeB)
Constructor which injects link length directly- Parameters:
groupId- , contiguous id generation within this group for instances of this classnodeA- the first node in the linknodeB- the second node in the link
-
MacroscopicLinkImpl
protected MacroscopicLinkImpl(IdGroupingToken groupId, N nodeA, N nodeB, double length)
Constructor which injects link length directly- Parameters:
groupId- , contiguous id generation within this group for instances of this classnodeA- the first node in the linknodeB- the second node in the linklength- the length of the link
-
-
Method Detail
-
shallowClone
public MacroscopicLinkImpl<N,LS> shallowClone()
Create a shallow copy of this entity- Specified by:
shallowClonein interfaceDirectedEdge- Specified by:
shallowClonein interfaceEdge- Specified by:
shallowClonein interfaceGraphEntity- Specified by:
shallowClonein interfaceIdAble- Specified by:
shallowClonein interfaceLink- Specified by:
shallowClonein interfaceMacroscopicLink- Overrides:
shallowClonein classLinkImpl<N extends DirectedVertex,LS extends MacroscopicLinkSegment>- Returns:
- shallow copy of entity
-
deepClone
public MacroscopicLinkImpl<N,LS> deepClone()
An id entity should always support a deep copy, i.e., all "owned" members will be deep copied when a clone of this instance is created via this call. To be used with caution if not called by managed id container related code- Specified by:
deepClonein interfaceDirectedEdge- Specified by:
deepClonein interfaceEdge- Specified by:
deepClonein interfaceGraphEntity- Specified by:
deepClonein interfaceIdAble- Specified by:
deepClonein interfaceLink- Specified by:
deepClonein interfaceMacroscopicLink- Overrides:
deepClonein classLinkImpl<N extends DirectedVertex,LS extends MacroscopicLinkSegment>- Returns:
- deep copy of entity
-
-