Class DirectedConnectoidImpl

    • Field Detail

      • directedConnectoidId

        protected long directedConnectoidId
        unique id across directed connectoids
      • accessEdgeSegment

        protected LinkSegment accessEdgeSegment
        the access point to an infrastructure layer
      • nodeAccessDownstream

        protected boolean nodeAccessDownstream
        the node access given an access edge segment is either up or downstream
    • Constructor Detail

      • DirectedConnectoidImpl

        protected DirectedConnectoidImpl​(IdGroupingToken idToken,
                                         boolean downstreamAccessNode,
                                         LinkSegment accessLinkSegment,
                                         Zone accessZone,
                                         double length)
        Constructor
        Parameters:
        idToken - contiguous id generation within this group for instances of this class
        downstreamAccessNode - when true access node is chosen as the downstream node of the segment, when false, upstream node is chosen
        accessLinkSegment - the link segment in the network (layer) the connectoid connects with (possibly via its downstream node)
        accessZone - for the connectoid
        length - for the connection (not of the edge segment, but to access the zone)
      • DirectedConnectoidImpl

        protected DirectedConnectoidImpl​(IdGroupingToken idToken,
                                         boolean downstreamAccessNode,
                                         LinkSegment accessLinkSegment)
        Constructor
        Parameters:
        idToken - contiguous id generation within this group for instances of this class
        downstreamAccessNode - when true access node is chosen as the downstream node of the segment, when false, upstream node is chosen
        accessLinkSegment - the link segment in the network (layer) the connectoid connects with (possibly via its downstream node)
      • DirectedConnectoidImpl

        protected DirectedConnectoidImpl​(DirectedConnectoidImpl other,
                                         boolean deepCopy)
        Copy constructor
        Parameters:
        other - to copy
        deepCopy - when true, create a deep copy, shallow copy otherwise
    • Method Detail

      • generateDirectedConnectoidId

        protected static long generateDirectedConnectoidId​(IdGroupingToken groupId)
        Generate directed connectoid id
        Parameters:
        groupId - contiguous id generation within this group for instances of this class
        Returns:
        id of directed connectoid
      • setDirectedConnectoidId

        protected void setDirectedConnectoidId​(long directedConnectoidId)
        set the directed connectoid id
        Parameters:
        directedConnectoidId - to use
      • setAccessLinkSegment

        protected void setAccessLinkSegment​(LinkSegment accessEdgeSegment)
        Set the accessEdgeSegment
        Parameters:
        accessEdgeSegment - to use
      • isNodeAccessDownstream

        public boolean isNodeAccessDownstream()
        determine if the node access is downstream or not
        Specified by:
        isNodeAccessDownstream in interface DirectedConnectoid
        Returns:
        true when downstream, false otherwise, i.e., upstream
      • setNodeAccessDownstream

        public void setNodeAccessDownstream​(boolean nodeAccessDownstream)
        set if the node access is downstream or not
        Specified by:
        setNodeAccessDownstream in interface DirectedConnectoid
        Parameters:
        nodeAccessDownstream - true to set it downstream, false otherwise
      • recreateManagedIds

        public long recreateManagedIds​(IdGroupingToken tokenId)
        recreate the internal id(s) and set them including the Idable id
        Specified by:
        recreateManagedIds in interface ManagedId
        Overrides:
        recreateManagedIds in class ConnectoidImpl
        Parameters:
        tokenId - to use (may be null in case managed id entity does not rely on token to recreate its managed id(s))
        Returns:
        the updated internal id