Class PathImpl

  • All Implemented Interfaces:
    Iterable<EdgeSegment>, Path

    public class PathImpl
    extends Object
    implements Path
    This object represents a path based on a number of consecutive LinkSegments The path creation makes use of the fact that the origin pair will have a null EdgeSegment, so there is no need to specify the origin.
    Author:
    gman6028
    • Constructor Detail

      • PathImpl

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

        public PathImpl​(IdGroupingToken groupId,
                        Deque<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

      • addEdgeSegment

        public Boolean addEdgeSegment​(EdgeSegment edgeSegment)
        add an edge segment to the path by appending it
        Specified by:
        addEdgeSegment in interface Path
        Parameters:
        edgeSegment - the edge segment to add
        Returns:
        true as per Collection.add
      • getId

        public long getId()
        Return the id of this path
        Specified by:
        getId in interface Path
        Returns:
        the id of this path
      • toString

        public String toString​(PathOutputIdentificationType pathOutputType)
        Outputs this path as a String, appropriate to a specified path output type
        Specified by:
        toString in interface Path
        Parameters:
        pathOutputType - the specified path output type
        Returns:
        String describing the path