Class ConnectoidEdgeImpl

    • Field Detail

      • connectoidEdgeId

        protected long connectoidEdgeId
        unique internal identifier across connectoid edges
    • Constructor Detail

      • ConnectoidEdgeImpl

        protected ConnectoidEdgeImpl​(IdGroupingToken groupId,
                                     Centroid centroidA,
                                     DirectedVertex vertexB,
                                     double length)
                              throws PlanItException
        Constructor
        Parameters:
        groupId - contiguous id generation within this group for instances of this class
        centroidA - the centroid at one end of the connectoid
        vertexB - the vertex at the other end of the connectoid
        length - length of the current connectoid
        Throws:
        PlanItException - thrown if there is an error
      • ConnectoidEdgeImpl

        protected ConnectoidEdgeImpl​(ConnectoidEdgeImpl connectoidEdgeImpl)
        Copy constructor
        Parameters:
        connectoidEdgeImpl - to copy
    • Method Detail

      • generateConnectoidEdgeId

        protected static long generateConnectoidEdgeId​(IdGroupingToken tokenId)
        Generate connectoid id
        Parameters:
        tokenId - contiguous id generation within this group for instances of this class
        Returns:
        id of connectoid edge
      • setConnectoidEdgeId

        protected void setConnectoidEdgeId​(long connectoidEdgeId)
        Set the connectoidEdgeId
        Parameters:
        connectoidEdgeId - to set
      • recreateConnectoidEdgeId

        protected long recreateConnectoidEdgeId​(IdGroupingToken tokenId)
        recreate the internal connectoid edge id and set it
        Parameters:
        tokenId - to use
        Returns:
        updated id
      • registerConnectoidSegment

        public ConnectoidSegment registerConnectoidSegment​(ConnectoidSegment connectoidSegment,
                                                           boolean directionAB)
                                                    throws PlanItException
        Register connectoidSegment. If there already exists a connectoidSegment for that direction it is replaced and returned
        Specified by:
        registerConnectoidSegment in interface ConnectoidEdge
        Parameters:
        connectoidSegment - connectoid segment to be registered
        directionAB - direction of travel
        Returns:
        replaced ConnectoidSegment
        Throws:
        PlanItException - thrown if there is an error
      • getConnectoidEdgeId

        public long getConnectoidEdgeId()
        Return the unique id of this connectoid edge
        Specified by:
        getConnectoidEdgeId in interface ConnectoidEdge
        Returns:
        id of this connectoid edge