Interface Link

  • All Superinterfaces:
    Comparable<Edge>, Edge, Serializable
    All Known Implementing Classes:
    LinkImpl

    public interface Link
    extends Edge
    Link interface which extends the Edge interface with a unique id (not all edges are links) as well as an external id
    Author:
    markr
    • Method Detail

      • registerLinkSegment

        LinkSegment registerLinkSegment​(LinkSegment linkSegment,
                                        boolean directionAB)
                                 throws PlanItException
        Register linkSegment. If there already exists a linkSegment for that direction it should be replaced and returned
        Parameters:
        linkSegment - the link segment to be registered
        directionAB - direction of travel
        Returns:
        the replaced LinkSegment
        Throws:
        PlanItException - thrown if there is an error
      • getLinkId

        long getLinkId()
        Return id of this instance. This id is expected to be generated using the org.planit.utils.misc.IdGenerator
        Returns:
        linkId
      • setExternalId

        void setExternalId​(Object externalId)
        Set the external id
        Parameters:
        externalId - the external id to set
      • getExternalId

        Object getExternalId()
        Collect the external id
        Returns:
        externalID
      • hasExternalId

        boolean hasExternalId()
        Returns whether the external Id has been set
        Returns:
        true if the external Id has been set, false otherwise