Class LinkFactoryImpl

    • Constructor Detail

      • LinkFactoryImpl

        public LinkFactoryImpl​(IdGroupingToken groupIdToken,
                               GraphEntities<Link> links)
        Constructor
        Parameters:
        groupIdToken - to use for creating element ids
        links - 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 interface LinkFactory
        Parameters:
        nodeA - the first node in this link
        nodeB - the second node in this link
        lengthKm - length of the link in km
        registerOnNodes - choice to register new edge on the vertices or not
        Returns:
        the created link