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
public class LinkFactoryImpl extends GraphEntityFactoryImpl<Link> implements LinkFactory
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, GraphEntities<Link> links)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LinkImpl
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
-
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.network.layer.physical.LinkFactory
registerNew
-
Methods inherited from interface org.goplanit.utils.id.ManagedIdEntityFactory
createUniqueCopyOf, getIdGroupingToken, setIdGroupingToken
-
-
-
-
Constructor Detail
-
LinkFactoryImpl
public LinkFactoryImpl(IdGroupingToken groupIdToken, GraphEntities<Link> links)
Constructor- Parameters:
groupIdToken
- to use for creating element idslinks
- to register the created instances on
-
-
Method Detail
-
registerNew
public LinkImpl 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
- 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
-
-