Class MacroscopicLinkFactoryImpl
- java.lang.Object
-
- org.goplanit.utils.id.ManagedIdEntityFactoryImpl<E>
-
- org.goplanit.graph.GraphEntityFactoryImpl<MacroscopicLink>
-
- org.goplanit.network.layer.macroscopic.MacroscopicLinkFactoryImpl
-
- All Implemented Interfaces:
GraphEntityFactory<MacroscopicLink>
,ManagedIdEntityFactory<MacroscopicLink>
,MacroscopicLinkFactory
,LinkFactory<MacroscopicLink>
public class MacroscopicLinkFactoryImpl extends GraphEntityFactoryImpl<MacroscopicLink> implements MacroscopicLinkFactory
Factory for creating macroscopic links on macroscopic links container- Author:
- markr
-
-
Field Summary
-
Fields inherited from class org.goplanit.utils.id.ManagedIdEntityFactoryImpl
groupIdToken
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
MacroscopicLinkFactoryImpl(IdGroupingToken groupIdToken)
Constructor without setting graph entitiesMacroscopicLinkFactoryImpl(IdGroupingToken groupIdToken, GraphEntities<MacroscopicLink> macroscopicLinks)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MacroscopicLinkImpl<Node,MacroscopicLinkSegment>
registerNew(Node nodeA, Node nodeB, double lengthKm, boolean registerOnNodes)
Create new macroscopic link on container, allow to be registered on nodes if indicated)protected void
setGraphEntities(GraphEntities<MacroscopicLink> macroscopicLinks)
Use with caution as it replaces the managed id container in its entirety-
Methods inherited from class org.goplanit.graph.GraphEntityFactoryImpl
getGraphEntities
-
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
-
MacroscopicLinkFactoryImpl
protected MacroscopicLinkFactoryImpl(IdGroupingToken groupIdToken)
Constructor without setting graph entities- Parameters:
groupIdToken
- to use for creating element ids
-
MacroscopicLinkFactoryImpl
public MacroscopicLinkFactoryImpl(IdGroupingToken groupIdToken, GraphEntities<MacroscopicLink> macroscopicLinks)
Constructor- Parameters:
groupIdToken
- to use for creating element idsmacroscopicLinks
- to register the created instances on
-
-
Method Detail
-
setGraphEntities
protected void setGraphEntities(GraphEntities<MacroscopicLink> macroscopicLinks)
Use with caution as it replaces the managed id container in its entirety- Overrides:
setGraphEntities
in classGraphEntityFactoryImpl<MacroscopicLink>
- Parameters:
macroscopicLinks
- to use as the managed id container
-
registerNew
public MacroscopicLinkImpl<Node,MacroscopicLinkSegment> registerNew(Node nodeA, Node nodeB, double lengthKm, boolean registerOnNodes)
Create new macroscopic link on container, allow to be registered on nodes if indicated)- Specified by:
registerNew
in interfaceLinkFactory<MacroscopicLink>
- Specified by:
registerNew
in interfaceMacroscopicLinkFactory
- Parameters:
nodeA
- the first node in this linknodeB
- the second node in this linklengthKm
- length of the link in kmregisterOnNodes
- choice to register new edge on the vertices or not- Returns:
- the created link
-
-