Class LinkFactoryImpl
- java.lang.Object
-
- org.goplanit.utils.id.ManagedIdEntityFactoryImpl<E>
-
- org.goplanit.graph.GraphEntityFactoryImpl<Link>
-
- org.goplanit.network.layer.physical.LinkFactoryImpl
-
- All Implemented Interfaces:
GraphEntityFactory<Link>
,ManagedIdEntityFactory<Link>
,LinkFactory<Link>
public class LinkFactoryImpl extends GraphEntityFactoryImpl<Link> implements LinkFactory<Link>
Factory for creating links on links container- Author:
- markr
-
-
Field Summary
-
Fields inherited from class org.goplanit.utils.id.ManagedIdEntityFactoryImpl
groupIdToken
-
-
Constructor Summary
Constructors Constructor Description LinkFactoryImpl(IdGroupingToken groupIdToken, Links<? extends Link> links)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LinkImpl<Node,LinkSegment>
registerNew(Node nodeA, Node nodeB, double lengthKm, boolean registerOnNodes)
Create new link on links container, allow to be registered on nodes if indicated)-
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
-
LinkFactoryImpl
public LinkFactoryImpl(IdGroupingToken groupIdToken, Links<? extends Link> links)
Constructor- Parameters:
groupIdToken
- to use for creating element idslinks
- to register the created instances on
-
-
Method Detail
-
registerNew
public LinkImpl<Node,LinkSegment> registerNew(Node nodeA, Node nodeB, double lengthKm, boolean registerOnNodes)
Create new link on links container, allow to be registered on nodes if indicated)- Specified by:
registerNew
in interfaceLinkFactory<Link>
- 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
-
-