Package org.planit.network.virtual
Class ConnectoidSegmentImpl
- java.lang.Object
-
- org.planit.graph.EdgeSegmentImpl
-
- org.planit.network.virtual.ConnectoidSegmentImpl
-
- All Implemented Interfaces:
Serializable
,Comparable<Idable>
,EdgeSegment
,ExternalIdable
,Idable
,ConnectoidSegment
public class ConnectoidSegmentImpl extends EdgeSegmentImpl implements ConnectoidSegment
The link segment that connects a zone to the physical network is not a physical link segment. However in order to be able to efficiently conduct path searches this connection needs to materialise in a similar form. to do this we construct ConnectoidLinkSegment instances which are a link segment, but do not have any physical characteristics apart from connecting a zone (via its centroid) to a physical node. these segments are NOT registered on the network because they are not part of the physical network, instead they are registered on the adopted zoning. they are however injected/connected to the connectoid reference nodes in the network as link segments to provide the above mentioned interface- Author:
- markr
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.planit.graph.EdgeSegmentImpl
xmlId
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ConnectoidSegmentImpl(ConnectoidSegmentImpl connectoidSegmentImpl)
Copy constructorprotected
ConnectoidSegmentImpl(IdGroupingToken groupId, ConnectoidEdge parentEdge, boolean directionAb)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectoidSegmentImpl
clone()
Clone the edge segmentprotected static long
generateConnectoidSegmentId(IdGroupingToken groupId)
generate unique connectoid segment idlong
getConnectoidSegmentId()
Collect the unqiue connectoid segment idprotected void
setConnectoidSegmentId(long connectoidSegmentId)
Set connectoid segment id-
Methods inherited from class org.planit.graph.EdgeSegmentImpl
equals, generateEdgeSegmentId, getDownstreamVertex, getExternalId, getId, getParentEdge, getUpstreamVertex, getXmlId, hashCode, isDirectionAb, remove, removeParentEdge, setDownstreamVertex, setExternalId, setId, setParentEdge, setUpstreamVertex, setXmlId, validate
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.planit.utils.graph.EdgeSegment
getDownstreamVertex, getParentEdge, getUpstreamVertex, isDirectionAb, remove, removeParentEdge, replace, setDownstreamVertex, setParentEdge, setUpstreamVertex, validate
-
Methods inherited from interface org.planit.utils.id.ExternalIdable
getExternalId, getXmlId, hasExternalId, hasXmlId, setExternalId, setXmlId
-
Methods inherited from interface org.planit.utils.id.Idable
compareTo, getId, idEquals, idHashCode
-
-
-
-
Constructor Detail
-
ConnectoidSegmentImpl
protected ConnectoidSegmentImpl(IdGroupingToken groupId, ConnectoidEdge parentEdge, boolean directionAb) throws PlanItException
Constructor- Parameters:
groupId
- contiguous id generation within this group for instances of this classparentEdge
- parent connectoiddirectionAb
- direction of travel- Throws:
PlanItException
- thrown when error
-
ConnectoidSegmentImpl
protected ConnectoidSegmentImpl(ConnectoidSegmentImpl connectoidSegmentImpl)
Copy constructor- Parameters:
connectoidSegmentImpl
- to set
-
-
Method Detail
-
generateConnectoidSegmentId
protected static long generateConnectoidSegmentId(IdGroupingToken groupId)
generate unique connectoid segment id- Parameters:
groupId
- contiguous id generation within this group for instances of this class- Returns:
- linkSegmentId
-
setConnectoidSegmentId
protected void setConnectoidSegmentId(long connectoidSegmentId)
Set connectoid segment id- Parameters:
connectoidSegmentId
- to set
-
getConnectoidSegmentId
public long getConnectoidSegmentId()
Collect the unqiue connectoid segment id- Specified by:
getConnectoidSegmentId
in interfaceConnectoidSegment
- Returns:
- connectoid segment id
-
clone
public ConnectoidSegmentImpl clone()
Clone the edge segment- Specified by:
clone
in interfaceEdgeSegment
- Overrides:
clone
in classEdgeSegmentImpl
- Returns:
- copy of this instance
-
-