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(MacroscopicLink parentLink, boolean directionAb)
Create macroscopic link segment, do not register nor register on nodes and linkPair<MacroscopicLinkSegment,MacroscopicLinkSegment>
registerNew(MacroscopicLink parentLink, boolean registerOnLink)
Create macroscopic link segments in both directions and register themMacroscopicLinkSegment
registerNew(MacroscopicLink parentLink, boolean directionAb, boolean registerOnLink)
Create a macroscopic link segment and register itMacroscopicLinkSegment
registerNew(MacroscopicLink parentLink, MacroscopicLinkSegmentType type, boolean directionAb, boolean registerOnLink)
Create a macroscopic link segment and register it-
Methods inherited from class org.goplanit.graph.GraphEntityFactoryImpl
getGraphEntities, setGraphEntities
-
Methods inherited from class org.goplanit.utils.id.ManagedIdEntityFactoryImpl
createUniqueDeepCopyOf, createUniqueShallowCopyOf, 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
createUniqueDeepCopyOf, createUniqueShallowCopyOf, getIdGroupingToken, setIdGroupingToken
-
-
-
-
Constructor Detail
-
MacroscopicLinkSegmentFactoryImpl
protected MacroscopicLinkSegmentFactoryImpl(IdGroupingToken groupId, MacroscopicLinkSegments macroscopicLinkSegments)
Constructor- Parameters:
groupId
- to usemacroscopicLinkSegments
- to use
-
-
Method Detail
-
create
public MacroscopicLinkSegment create(MacroscopicLink parentLink, boolean directionAb)
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
-
registerNew
public MacroscopicLinkSegment registerNew(MacroscopicLink parentLink, boolean directionAb, boolean registerOnLink)
Create a macroscopic link segment and register it- Specified by:
registerNew
in interfaceMacroscopicLinkSegmentFactory
- Parameters:
parentLink
- the parent of this segmentdirectionAb
- direction of travelregisterOnLink
- option to register the new segment on the underlying link- Returns:
- the created segment
-
registerNew
public MacroscopicLinkSegment registerNew(MacroscopicLink parentLink, MacroscopicLinkSegmentType type, boolean directionAb, boolean registerOnLink)
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 travelregisterOnLink
- option to register the new segment on the underlying link- Returns:
- the created segment
-
registerNew
public Pair<MacroscopicLinkSegment,MacroscopicLinkSegment> registerNew(MacroscopicLink parentLink, boolean registerOnLink)
Create macroscopic link segments in both directions and register them- Specified by:
registerNew
in interfaceMacroscopicLinkSegmentFactory
- Parameters:
parentLink
- the parent of this segmentregisterOnLink
- option to register the new segment on the underlying link- Returns:
- the created segments as a pair with direction (Ab,Ba)
-
-