Interface SimpleDirectedPath

    • Method Detail

      • size

        long size()
        The size of the path is given by the number of edge segments it holds
        Returns:
        size
      • isEmpty

        default boolean isEmpty()
        verify if the size of the path is zero (empty) or not
        Returns:
        true when empty, false otherwise
      • containsSubPath

        boolean containsSubPath​(Collection<? extends EdgeSegment> subPath)
        Verify if the path contains the provided subpath. It is only a subpath of the subpath is present continguously
        Parameters:
        subPath - to verify
        Returns:
        true when it contains the subpath, false otherwise.
      • containsSubPath

        boolean containsSubPath​(Iterator<? extends EdgeSegment> subPath)
        Verify if the path contains the provided subpath. It is only a subpath of the subpath is present contiguously
        Parameters:
        subPath - to verify
        Returns:
        true when it contains the subpath, false otherwise.
      • computeLengthKm

        default double computeLengthKm()
        Compute the length in km of the path based on the sum of the edge segment's getLengthKm method
        Returns:
        total length of path in km
      • getFirstSegment

        EdgeSegment getFirstSegment()
        Collect first segment on path
        Returns:
        initial segment
      • getLastSegment

        EdgeSegment getLastSegment()
        Collect last segment on path
        Returns:
        last segment
      • hashCode

        int hashCode()
        hash code for simple directed path
        Overrides:
        hashCode in class Object
        Returns:
        hash code of path