Class ConnectoidSegmentImpl

  • All Implemented Interfaces:
    Serializable, Cloneable, Comparable<IdAble>, EdgeSegment, GraphEntity, ExternalIdAble, IdAble, ManagedId, ConnectoidSegment, PcuCapacitated

    public class ConnectoidSegmentImpl
    extends EdgeSegmentImpl
    implements ConnectoidSegment
    The link segment that connects a zone to the physical network is not a physical link segment. However in order to be able to efficiently conduct path searches this connection needs to materialise in a similar form. to do this we construct ConnectoidLinkSegment instances which are a link segment, but do not have any physical characteristics apart from connecting a zone (via its centroid) to a physical node. these segments are NOT registered on the network because they are not part of the physical network, instead they are registered on the adopted zoning. they are however injected/connected to the connectoid reference nodes in the network as link segments to provide the above mentioned interface
    Author:
    markr
    See Also:
    Serialized Form
    • Constructor Detail

      • ConnectoidSegmentImpl

        protected ConnectoidSegmentImpl​(IdGroupingToken groupId,
                                        ConnectoidEdge parentEdge,
                                        boolean directionAb)
                                 throws PlanItException
        Constructor
        Parameters:
        groupId - contiguous id generation within this group for instances of this class
        parentEdge - parent connectoid
        directionAb - direction of travel
        Throws:
        PlanItException - thrown when error
      • ConnectoidSegmentImpl

        protected ConnectoidSegmentImpl​(ConnectoidSegmentImpl connectoidSegmentImpl)
        Copy constructor
        Parameters:
        connectoidSegmentImpl - to set
    • Method Detail

      • generateConnectoidSegmentId

        protected static long generateConnectoidSegmentId​(IdGroupingToken groupId)
        generate unique connectoid segment id
        Parameters:
        groupId - contiguous id generation within this group for instances of this class
        Returns:
        linkSegmentId
      • setConnectoidSegmentId

        protected void setConnectoidSegmentId​(long connectoidSegmentId)
        Set connectoid segment id
        Parameters:
        connectoidSegmentId - to set
      • recreateConnectoidSegmentId

        protected long recreateConnectoidSegmentId​(IdGroupingToken tokenId)
        recreate the internal connectoid segment id and set it
        Parameters:
        tokenId - to use
        Returns:
        updated id
      • getConnectoidSegmentId

        public long getConnectoidSegmentId()
        Collect the unqiue connectoid segment id
        Specified by:
        getConnectoidSegmentId in interface ConnectoidSegment
        Returns:
        connectoid segment id