Interface DirectedEdge

    • Method Detail

      • registerEdgeSegment

        EdgeSegment registerEdgeSegment​(EdgeSegment edgeSegment,
                                        boolean directionAB)
        Register EdgeSegment. If there already exists an edgeSegment for that direction it is replaced and returned. If the edge segment has no parent edge, this edge is set. If there is a discrepancy between the edge segment's parent edge and this edge a warning is issued and the edge segment is not registered
        Parameters:
        edgeSegment - the edgeSegment to be registered
        directionAB - direction of travel
        Returns:
        replaced egeSegment (if any)
      • 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
      • 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
      • 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
      • getEdgeSegments

        default Collection<? extends EdgeSegment> getEdgeSegments()
        collect all edge segments available on the edge
        Returns:
        available edge segments