Class DirectedPathImpl

    • Constructor Detail

      • DirectedPathImpl

        protected DirectedPathImpl​(IdGroupingToken groupId)
        Constructor
        Parameters:
        groupId - contiguous id generation within this group for instances of this class
      • DirectedPathImpl

        protected DirectedPathImpl​(IdGroupingToken groupId,
                                   Deque<? extends EdgeSegment> pathEdgeSegments)
        Constructor
        Parameters:
        groupId - contiguous id generation within this group for instances of this class
        pathEdgeSegments - the path to set (not copied)
    • Method Detail

      • generateId

        protected static long generateId​(IdGroupingToken groupId)
        Generate an id for this instance
        Parameters:
        groupId - to use
        Returns:
        created id
      • recreateManagedIds

        public long recreateManagedIds​(IdGroupingToken tokenId)
        recreate the internal id(s) and set them including the Idable id
        Specified by:
        recreateManagedIds in interface ManagedId
        Parameters:
        tokenId - to use
        Returns:
        the updated internal id
      • size

        public long size()
        The size of the path is given by the number of edge segments it holds
        Specified by:
        size in interface DirectedPath
        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 DirectedPath
        Parameters:
        subPath - to verify
        Returns:
        true when it contains the subpath, false otherwise.