Interface DirectedEdge

    • Method Detail

      • registerEdgeSegment

        EdgeSegment registerEdgeSegment​(EdgeSegment edgeSegment,
                                        boolean directionAB)
                                 throws PlanItException
        Register EdgeSegment. If there already exists an edgeSegment for that direction it is replaced and returned
        Parameters:
        edgeSegment - the edgeSegment to be registered
        directionAB - direction of travel
        Returns:
        replaced egeSegment (if any)
        Throws:
        PlanItException - thrown if there is an error
      • getEdgeSegmentAb

        EdgeSegment getEdgeSegmentAb()
        Edge segment in the direction from A to B
        Returns:
        edge segment AB
      • getEdgeSegmentBa

        EdgeSegment getEdgeSegmentBa()
        Edge segment in the direction from B to A
        Returns:
        edge segment BA
      • getEdgeSegment

        default EdgeSegment getEdgeSegment​(boolean directionAb)
        Edge segment in the direction indicated
        Parameters:
        directionAb - direction of segment
        Returns:
        edge segment if present
      • hasEdgeSegmentBa

        default boolean hasEdgeSegmentBa()
        Verify if edge segment BA exists
        Returns:
        true if present, false otherwise
      • hasEdgeSegmentAb

        default boolean hasEdgeSegmentAb()
        Verify if edge segment BA exists
        Returns:
        true if present, false otherwise
      • replace

        void replace​(EdgeSegment edgeSegmentToReplace,
                     EdgeSegment edgeSegmentToReplaceWith)
        replace passed in edge segment (if present) with the passed in one
        Parameters:
        edgeSegmentToReplace - the one to replace
        edgeSegmentToReplaceWith - the one to replace it with