Interface PhysicalNetworkBuilder

  • All Known Implementing Classes:
    MacroscopicNetworkBuilder

    public interface PhysicalNetworkBuilder
    Build network elements based on chosen network view. Implementations are registered on the network class which uses it to construct network elements
    Author:
    markr
    • Method Detail

      • createNode

        Node createNode()
        Create a new node instance
        Returns:
        created node
      • createMode

        Mode createMode​(long externalModeId,
                        String name,
                        double pcu)
        Create a new mode
        Parameters:
        pcu - pcu value of the mode
        name - name of the mode
        externalModeId - external id of the mode
        Returns:
        created mode
      • createLink

        Link createLink​(Node nodeA,
                        Node nodeB,
                        double length,
                        String name)
                 throws PlanItException
        Create a new link instance
        Parameters:
        nodeA - the first node in this link
        nodeB - the second node in this link
        length - the length of this link
        name - the name of the link
        Returns:
        created link
        Throws:
        PlanItException - thrown if there is an error
      • createLinkSegment

        LinkSegment createLinkSegment​(Link parentLink,
                                      boolean directionAB)
        Create a new physical link segment instance
        Parameters:
        parentLink - the parent link of the link segment
        directionAB - direction of travel
        Returns:
        linkSegment the created link segment
      • setIdGroupingToken

        void setIdGroupingToken​(IdGroupingToken groupId)
        Each builder needs a group if token to allow all underlying factory methods to generated ids uniquely tied to the group the entities belong to
        Parameters:
        groupId - , contiguous id generation within this group for instances created with the factory methods
      • getIdGroupingToken

        IdGroupingToken getIdGroupingToken()
        Collect the id grouping token used by this builder
        Returns:
        idGroupingToken the id grouping token used by this builder