Class SimpleDirectedPathImpl

    • Constructor Detail

      • SimpleDirectedPathImpl

        protected SimpleDirectedPathImpl()
        Constructor
      • SimpleDirectedPathImpl

        protected SimpleDirectedPathImpl​(SimpleDirectedPathImpl other)
        Copy constructor (shallow copy)
        Parameters:
        other - to copy
      • SimpleDirectedPathImpl

        protected SimpleDirectedPathImpl​(Deque<? extends EdgeSegment> pathEdgeSegments)
        Constructor
        Parameters:
        pathEdgeSegments - the path to set (not copied)
    • Method Detail

      • size

        public long size()
        The size of the path is given by the number of edge segments it holds
        Specified by:
        size in interface SimpleDirectedPath
        Returns:
        size
      • containsSubPath

        public 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
        Specified by:
        containsSubPath in interface SimpleDirectedPath
        Parameters:
        subPath - to verify
        Returns:
        true when it contains the subpath, false otherwise.
      • containsSubPath

        public boolean containsSubPath​(Iterator<? extends EdgeSegment> subPathIter)
        Verify if the path contains the provided subpath. It is only a subpath of the subpath is present contiguously
        Specified by:
        containsSubPath in interface SimpleDirectedPath
        Parameters:
        subPathIter - to verify
        Returns:
        true when it contains the subpath, false otherwise.
      • append

        public void append​(EdgeSegment... edgeSegments)
        Append given edge segments to the simple path
        Parameters:
        edgeSegments - to add
      • prepend

        public void prepend​(EdgeSegment... edgeSegments)
        Prepend given edge segments to the simple path
        Parameters:
        edgeSegments - to add