Class LinkSegmentFactoryImpl
- java.lang.Object
-
- org.goplanit.utils.id.ManagedIdEntityFactoryImpl<E>
-
- org.goplanit.graph.GraphEntityFactoryImpl<LinkSegment>
-
- org.goplanit.network.layer.physical.LinkSegmentFactoryImpl
-
- All Implemented Interfaces:
GraphEntityFactory<LinkSegment>
,ManagedIdEntityFactory<LinkSegment>
,LinkSegmentFactory
public class LinkSegmentFactoryImpl extends GraphEntityFactoryImpl<LinkSegment> implements LinkSegmentFactory
Factory for creating link segments on link segments container- Author:
- markr
-
-
Field Summary
-
Fields inherited from class org.goplanit.utils.id.ManagedIdEntityFactoryImpl
groupIdToken
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
LinkSegmentFactoryImpl(IdGroupingToken groupId, LinkSegments linkSegments)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LinkSegment
create(Link parentLink, boolean directionAB)
Create link segmentLinkSegment
registerNew(Link parentLink, boolean directionAb, boolean registerOnNodeAndLink)
Create link segment and register it-
Methods inherited from class org.goplanit.graph.GraphEntityFactoryImpl
getGraphEntities
-
Methods inherited from class org.goplanit.utils.id.ManagedIdEntityFactoryImpl
createUniqueCopyOf, getIdGroupingToken, setIdGroupingToken
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.utils.id.ManagedIdEntityFactory
createUniqueCopyOf, getIdGroupingToken, setIdGroupingToken
-
-
-
-
Constructor Detail
-
LinkSegmentFactoryImpl
protected LinkSegmentFactoryImpl(IdGroupingToken groupId, LinkSegments linkSegments)
Constructor- Parameters:
groupId
- to uselinkSegments
- to use
-
-
Method Detail
-
create
public LinkSegment create(Link parentLink, boolean directionAB) throws PlanItException
Create link segment- Specified by:
create
in interfaceLinkSegmentFactory
- Parameters:
parentLink
- the parent of this segmentdirectionAB
- direction of travel- Returns:
- the created segment
- Throws:
PlanItException
- thrown if error
-
registerNew
public LinkSegment registerNew(Link parentLink, boolean directionAb, boolean registerOnNodeAndLink) throws PlanItException
Create link segment and register it- Specified by:
registerNew
in interfaceLinkSegmentFactory
- Parameters:
parentLink
- the parent of this segmentdirectionAb
- direction of travelregisterOnNodeAndLink
- option to register the new segment on the underlying link and its nodes- Returns:
- the created segment
- Throws:
PlanItException
- thrown if error
-
-