Class MacroscopicLinkSegmentFactoryImpl
- java.lang.Object
-
- org.goplanit.utils.id.ManagedIdEntityFactoryImpl<E>
-
- org.goplanit.graph.GraphEntityFactoryImpl<MacroscopicLinkSegment>
-
- org.goplanit.network.layer.macroscopic.MacroscopicLinkSegmentFactoryImpl
-
- All Implemented Interfaces:
GraphEntityFactory<MacroscopicLinkSegment>
,ManagedIdEntityFactory<MacroscopicLinkSegment>
,MacroscopicLinkSegmentFactory
public class MacroscopicLinkSegmentFactoryImpl extends GraphEntityFactoryImpl<MacroscopicLinkSegment> implements MacroscopicLinkSegmentFactory
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
MacroscopicLinkSegmentFactoryImpl(IdGroupingToken groupId, MacroscopicLinkSegments macroscopicLinkSegments)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MacroscopicLinkSegment
create(Link parentLink, boolean directionAB)
Create macroscopic link segment, do not register nor register on nodes and linkMacroscopicLinkSegment
registerNew(Link parentLink, boolean directionAb, boolean registerOnNodeAndLink)
Create a macroscopic link segment and register itMacroscopicLinkSegment
registerNew(Link parentLink, MacroscopicLinkSegmentType type, boolean directionAb, boolean registerOnNodeAndLink)
Create a macroscopic 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
-
MacroscopicLinkSegmentFactoryImpl
protected MacroscopicLinkSegmentFactoryImpl(IdGroupingToken groupId, MacroscopicLinkSegments macroscopicLinkSegments)
Constructor- Parameters:
groupId
- to usemacroscopicLinkSegments
- to use
-
-
Method Detail
-
create
public MacroscopicLinkSegment create(Link parentLink, boolean directionAB) throws PlanItException
Create macroscopic link segment, do not register nor register on nodes and link- Specified by:
create
in interfaceMacroscopicLinkSegmentFactory
- Parameters:
parentLink
- the parent of this segmentdirectionAB
- direction of travel- Returns:
- the created segment
- Throws:
PlanItException
- thrown if error
-
registerNew
public MacroscopicLinkSegment registerNew(Link parentLink, boolean directionAb, boolean registerOnNodeAndLink) throws PlanItException
Create a macroscopic link segment and register it- Specified by:
registerNew
in interfaceMacroscopicLinkSegmentFactory
- 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
-
registerNew
public MacroscopicLinkSegment registerNew(Link parentLink, MacroscopicLinkSegmentType type, boolean directionAb, boolean registerOnNodeAndLink) throws PlanItException
Create a macroscopic link segment and register it- Specified by:
registerNew
in interfaceMacroscopicLinkSegmentFactory
- Parameters:
parentLink
- the parent of this segmenttype
- the type of the link 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
-
-