Interface Graph<ST extends GraphSegment<ST,​PT>,​PT extends GraphPoint<PT,​ST>>

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      boolean contains​(Object obj)
      Replies is this graph contains the given segment.
      default GraphIterator<ST,​PT> depthIterator​(ST startingSegment, double depth, double positionFromStartingPoint, PT startingPoint, boolean allowManyReplies, boolean assumeOrientedSegments)
      Replies an iterator that permits to move along the segment's graph starting from the specified segment and from the specified starting point.
      GraphIterator<ST,​PT> depthIterator​(ST startingSegment, double depth, double positionFromStartingPoint, PT startingPoint, boolean allowManyReplies, boolean assumeOrientedSegments, DynamicDepthUpdater<ST,​PT> dynamicDepthUpdater)
      Replies an iterator that permits to move along the segment's graph starting from the specified segment and from the specified starting point.
      int getPointCount()
      Replies the count of points in this graph.
      int getSegmentCount()
      Replies the count of segments in this graph.
      boolean isEmpty()
      Replies if this graph is empty or not.
      GraphIterator<ST,​PT> iterator​(ST startingSegment, PT startingPoint, boolean allowManyReplies, boolean assumeOrientedSegments)
      Replies an iterator that permits to move along the road segment's graph starting from this road segment and from the specified starting point.
    • Method Detail

      • getSegmentCount

        @Pure
        int getSegmentCount()
        Replies the count of segments in this graph.
        Returns:
        the count of segments in this graph.
      • getPointCount

        @Pure
        int getPointCount()
        Replies the count of points in this graph.
        Returns:
        the count of points in this graph.
      • isEmpty

        @Pure
        boolean isEmpty()
        Replies if this graph is empty or not.
        Returns:
        true if the graph is empty, otherwise false.
      • contains

        @Pure
        boolean contains​(Object obj)
        Replies is this graph contains the given segment. The test is based on Object.equals(Object).
        Parameters:
        obj - the object to search for.
        Returns:
        true if the graph contains the segment, otherwise false.
      • iterator

        @Pure
        GraphIterator<ST,​PT> iterator​(ST startingSegment,
                                            PT startingPoint,
                                            boolean allowManyReplies,
                                            boolean assumeOrientedSegments)
        Replies an iterator that permits to move along the road segment's graph starting from this road segment and from the specified starting point.
        Parameters:
        startingSegment - is the first segment to iterate.
        startingPoint - is the starting point of the iterations.
        allowManyReplies - may be true to allow to reply many times the same segment, otherwhise false.
        assumeOrientedSegments - may be true to assume that the same segment has two different instances for graph iteration: the first instance is associated the first point of the segment and the second instance is associated to the last point of the segment. If this parameter is false to assume that the end points of a segment are not distinguished.
        Returns:
        the iterator.
      • depthIterator

        @Pure
        default GraphIterator<ST,​PT> depthIterator​(ST startingSegment,
                                                         double depth,
                                                         double positionFromStartingPoint,
                                                         PT startingPoint,
                                                         boolean allowManyReplies,
                                                         boolean assumeOrientedSegments)
        Replies an iterator that permits to move along the segment's graph starting from the specified segment and from the specified starting point. If the specified starting point is not one of the ends of the segment, this function assumes to start from the point replied by GraphSegment.getBeginPoint().

        This function does not allow the cycles during the iterations.

        Parameters:
        startingSegment - is the first segment to iterate.
        depth - is the maximal depth to reach.
        positionFromStartingPoint - is the starting position from the startingPoint.
        startingPoint - is the starting point of the iterations.
        allowManyReplies - may be true to allow to reply many times the same segment, otherwhise false.
        assumeOrientedSegments - may be true to assume that the same segment has two different instances for graph iteration: the first instance is associated the first point of the segment and the second instance is associated to the last point of the segment. If this parameter is false to assume that the end points of a segment are not distinguished.
        Returns:
        the iterator.
        See Also:
        depthIterator(GraphSegment, double, double, GraphPoint, boolean, boolean, DynamicDepthUpdater)
      • depthIterator

        @Pure
        GraphIterator<ST,​PT> depthIterator​(ST startingSegment,
                                                 double depth,
                                                 double positionFromStartingPoint,
                                                 PT startingPoint,
                                                 boolean allowManyReplies,
                                                 boolean assumeOrientedSegments,
                                                 DynamicDepthUpdater<ST,​PT> dynamicDepthUpdater)
        Replies an iterator that permits to move along the segment's graph starting from the specified segment and from the specified starting point. If the specified starting point is not one of the ends of the segment, this function assumes to start from the point replied by GraphSegment.getBeginPoint().

        This function does not allow the cycles during the iterations.

        Parameters:
        startingSegment - is the first segment to iterate.
        depth - is the maximal depth to reach.
        positionFromStartingPoint - is the starting position from the startingPoint.
        startingPoint - is the starting point of the iterations.
        allowManyReplies - may be true to allow to reply many times the same segment, otherwhise false.
        assumeOrientedSegments - may be true to assume that the same segment has two different instances for graph iteration: the first instance is associated the first point of the segment and the second instance is associated to the last point of the segment. If this parameter is false to assume that the end points of a segment are not distinguished.
        dynamicDepthUpdater - if not null, it is a lambda that is used for dynamically updating the maximal depth.
        Returns:
        the iterator.
        Since:
        16.0
        See Also:
        depthIterator(GraphSegment, double, double, GraphPoint, boolean, boolean)