Class RoadConnectionWithArrivalSegment

    • Constructor Detail

      • RoadConnectionWithArrivalSegment

        RoadConnectionWithArrivalSegment​(StandardRoadConnection connection,
                                         RoadSegment arrivalSegment,
                                         boolean startConnection)
        Create a new road connection.

        A RoadConnection must be created thru a StandardRoadNetwork.

        Parameters:
        connection - is the wrapped connection
        arrivalSegment - is the segment that permits to arrive to the road connection
        startConnection - is true is the enter point is the start.
    • Method Detail

      • getWrappedRoadConnection

        @Pure
        public RoadConnection getWrappedRoadConnection()
        Description copied from interface: RoadConnection
        Replies the wrapped road connection if this object is a wrapper to another road connection. If this object is not a wrapper to another road connection, relies this object iteself.
        Specified by:
        getWrappedRoadConnection in interface RoadConnection
        Returns:
        the wrapped road connection or this road connection itself.
      • equals

        @Pure
        public boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • hashCode

        @Pure
        public int hashCode()
        Overrides:
        hashCode in class Object
      • getArrivalSegment

        @Pure
        public RoadSegment getArrivalSegment()
        Replies the segment that is the arrival segment at this road connection.
        Returns:
        the segment
      • isArrivalSegmentConnectedByStartPoint

        @Pure
        public boolean isArrivalSegmentConnectedByStartPoint()
        Replies if the arrival segment is connected to this road connection by its start point.
        Returns:
        true if the arrival segment is connected by its start point, false if it is connected by its end segment.
      • getUUID

        @Pure
        public UUID getUUID()
        Description copied from interface: RoadConnection
        Replies an unique identifier for element.

        A Unique IDentifier (UID) must be unique for all the object instances.

        Specified by:
        getUUID in interface RoadConnection
        Returns:
        the identifier
      • isNearPoint

        @Pure
        public boolean isNearPoint​(Point2D<?,​?> point)
        Description copied from interface: RoadConnection
        Replies if the specified point is near this connection point.
        Specified by:
        isNearPoint in interface RoadConnection
        Parameters:
        point - is the point to test
        Returns:
        true if the point is near this connection, otherwise false.
      • getPoint

        @Pure
        public Point2d getPoint()
        Description copied from interface: RoadConnection
        Replies the coordinates of this road connection.
        Specified by:
        getPoint in interface RoadConnection
        Returns:
        the coordinates of this road connection.
      • getGeoLocation

        @Pure
        public GeoLocationPoint getGeoLocation()
        Description copied from interface: RoadConnection
        Replies the geographic coordinates of this road connection.
        Specified by:
        getGeoLocation in interface RoadConnection
        Returns:
        the geographic coordinates of this road connection.
      • isEmpty

        @Pure
        public boolean isEmpty()
        Description copied from interface: RoadConnection
        Replies if this connection has no connected segment.
        Specified by:
        isEmpty in interface RoadConnection
        Returns:
        true if this object has no connected segment, otherwise false
      • getOtherSideSegment

        @Pure
        public RoadSegment getOtherSideSegment​(RoadSegment ref_segment)
        Description copied from interface: RoadConnection
        Replies the other segment also connected to this point. If more than 2 segments were connected to this point, this function replies null.
        Specified by:
        getOtherSideSegment in interface RoadConnection
        Parameters:
        ref_segment - the segment.
        Returns:
        the first segment if ref_segment was the second one. the second segment if ref_segment was the first one. otherwise null.
      • toCounterclockwiseIterator

        @Pure
        public Iterator<RoadSegment> toCounterclockwiseIterator​(RoadSegment startSegment,
                                                                RoadSegment endSegment)
        Description copied from interface: RoadConnection
        Replies an iterator which loop on the segment in a counterclockwise order from the first occurrence. of specified start segment to the first occurrence. of the specified end segment.

        This function assumes a CoordinateSystemConstants.GIS_2D

        Specified by:
        toCounterclockwiseIterator in interface RoadConnection
        Parameters:
        startSegment - is the first segment to iterate.
        endSegment - is the last segment to iterate.
        Returns:
        the iterator on segments.
      • toCounterclockwiseIterator

        @Pure
        public Iterator<RoadSegment> toCounterclockwiseIterator​(RoadSegment startSegment,
                                                                Boolean startSegmentConnectedByItsStart,
                                                                RoadSegment endSegment,
                                                                Boolean endSegmentConnectedByItsStart)
        Description copied from interface: RoadConnection
        Replies an iterator which loop on the segment in a counterclockwise order from the specified start segment to the specified end segment.

        This function assumes that startSegmentConnectedByItsStart and endSegmentConnectedByItsStart parameters indicates how the segments should be connected. These values are useful to indicates how to iterate when the segment is connected to this RoadConnexion by its two ends. The semantics of the these values are:

        • true, the segment will be replied by the iterator when its start point will be found in the list;
        • false, the segment will be replied by the iterator when its end point will be found in the list;
        • null, the segment will be replied when it will be found at the first time in the list.

        The first segment replied by this function will be the startSegment or the second segment from the list, according to the default clockwhise type. The last segment replied by this function will be the endSegment or the antepenulvian segment from the list, according to the default clockwhise type.

        This function assumes a CoordinateSystemConstants.GIS_2D

        Specified by:
        toCounterclockwiseIterator in interface RoadConnection
        Parameters:
        startSegment - is the first segment to iterate (inclusive).
        startSegmentConnectedByItsStart - indicates if the start segment is connected by its first point.
        endSegment - is the last segment to iterate (inclusive).
        endSegmentConnectedByItsStart - indicates if the start segment is connected by its first point.
        Returns:
        the iterator on segments.
      • toCounterclockwiseIterator

        @Pure
        public Iterator<RoadSegment> toCounterclockwiseIterator​(RoadSegment startSegment,
                                                                Boolean startSegmentConnectedByItsStart,
                                                                RoadSegment endSegment,
                                                                Boolean endSegmentConnectedByItsStart,
                                                                RoadConnection.ClockwiseBoundType boundType)
        Description copied from interface: RoadConnection
        Replies an iterator which loop on the segment in a counterclockwise order from the specified start segment to the specified end segment.

        This function assumes that startSegmentConnectedByItsStart and endSegmentConnectedByItsStart parameters indicates how the segments should be connected. These values are useful to indicates how to iterate when the segment is connected to this RoadConnexion by its two ends. The semantics of the these values are:

        • true, the segment will be replied by the iterator when its start point will be found in the list;
        • false, the segment will be replied by the iterator when its end point will be found in the list;
        • null, the segment will be replied when it will be found at the first time in the list.

        The first segment replied by this function will be the startSegment or the second segment from the list, according to bountType. The last segment replied by this function will be the endSegment or the antepenulvian segment from the list, according to bountType.

        This function assumes a CoordinateSystemConstants.GIS_2D

        Specified by:
        toCounterclockwiseIterator in interface RoadConnection
        Parameters:
        startSegment - is the first segment to iterate.
        startSegmentConnectedByItsStart - indicates if the start segment is connected by its first point.
        endSegment - is the last segment to iterate.
        endSegmentConnectedByItsStart - indicates if the start segment is connected by its first point.
        boundType - indicates if the two given segments will be included into the iterated segment set.
        Returns:
        the iterator on segments.
      • toCounterclockwiseIterator

        @Pure
        public Iterator<RoadSegment> toCounterclockwiseIterator​(RoadSegment startSegment)
        Description copied from interface: RoadConnection
        Replies an iterator which loop on the segment in a counterclockwise order from the specified segment.

        The first segment replied by this function will be the startSegment or the second segment from the list, according to the default clockwhise type. Assuming that the segment candidates should be replied only once time if they are all included, the startSegment will never be replied as the last segment.

        This function assumes a CoordinateSystemConstants.GIS_2D

        Specified by:
        toCounterclockwiseIterator in interface RoadConnection
        Parameters:
        startSegment - is the first segment to iterate.
        Returns:
        an iterable data structure.
      • toCounterclockwiseIterator

        @Pure
        public Iterator<RoadSegment> toCounterclockwiseIterator​(RoadSegment startSegment,
                                                                RoadConnection.ClockwiseBoundType boundType)
        Description copied from interface: RoadConnection
        Replies an iterator which loop on the segment in a counterclockwise order from the specified segment.

        The first segment replied by this function will be the startSegment or the second segment from the list, according to bountType. The last segment replied by this function will be the last or antepenulvian segment from the list, according to bountType.

        This function assumes a CoordinateSystemConstants.GIS_2D

        Specified by:
        toCounterclockwiseIterator in interface RoadConnection
        Parameters:
        startSegment - is the first segment to iterate.
        boundType - indicates if the two given segments will be included into the iterated segment set.
        Returns:
        an iterable data structure.
      • toCounterclockwiseIterator

        @Pure
        public Iterator<RoadSegment> toCounterclockwiseIterator​(RoadSegment startSegment,
                                                                RoadSegment endSegment,
                                                                CoordinateSystem2D system)
        Description copied from interface: RoadConnection
        Replies an iterator which loop on the segment in a counterclockwise order from the first occurrence. of specified start segment to the first occurrence. of the specified end segment.
        Specified by:
        toCounterclockwiseIterator in interface RoadConnection
        Parameters:
        startSegment - is the first segment to iterate.
        endSegment - is the last segment to iterate.
        system - is the 2D coordinate system used to project a counterclockwise circle.
        Returns:
        the iterator on segments.
      • toCounterclockwiseIterator

        @Pure
        public Iterator<RoadSegment> toCounterclockwiseIterator​(RoadSegment startSegment,
                                                                Boolean startSegmentConnectedByItsStart,
                                                                RoadSegment endSegment,
                                                                Boolean endSegmentConnectedByItsStart,
                                                                CoordinateSystem2D system)
        Description copied from interface: RoadConnection
        Replies an iterator which loop on the segment in a counterclockwise order from the specified start segment to the specified end segment.

        This function assumes that startSegmentConnectedByItsStart and endSegmentConnectedByItsStart parameters indicates how the segments should be connected. These values are useful to indicates how to iterate when the segment is connected to this RoadConnexion by its two ends. The semantics of the these values are:

        • true, the segment will be replied by the iterator when its start point will be found in the list;
        • false, the segment will be replied by the iterator when its end point will be found in the list;
        • null, the segment will be replied when it will be found at the first time in the list.

        The first segment replied by this function will be the startSegment or the second segment from the list, according to the default clockwhise type. The last segment replied by this function will be the endSegment or the antepenulvian segment from the list, according to the default clockwhise type.

        Specified by:
        toCounterclockwiseIterator in interface RoadConnection
        Parameters:
        startSegment - is the first segment to iterate (inclusive).
        startSegmentConnectedByItsStart - indicates if the start segment is connected by its first point.
        endSegment - is the last segment to iterate (inclusive).
        endSegmentConnectedByItsStart - indicates if the start segment is connected by its first point.
        system - is the 2D coordinate system used to project a counterclockwise circle.
        Returns:
        the iterator on segments.
      • toCounterclockwiseIterator

        @Pure
        public Iterator<RoadSegment> toCounterclockwiseIterator​(RoadSegment startSegment,
                                                                RoadSegment endSegment,
                                                                RoadConnection.ClockwiseBoundType boundType,
                                                                CoordinateSystem2D system)
        Description copied from interface: RoadConnection
        Replies an iterator which loop on the segment in a counterclockwise order from the first occurrence. of specified start segment to the first occurrence. of the specified end segment.
        Specified by:
        toCounterclockwiseIterator in interface RoadConnection
        Parameters:
        startSegment - is the first segment to iterate.
        endSegment - is the last segment to iterate.
        boundType - indicates if the two given segments will be included into the iterated segment set.
        system - is the 2D coordinate system used to project a counterclockwise circle.
        Returns:
        the iterator on segments.
      • toCounterclockwiseIterator

        @Pure
        public Iterator<RoadSegment> toCounterclockwiseIterator​(RoadSegment startSegment,
                                                                Boolean startSegmentConnectedByItsStart,
                                                                RoadSegment endSegment,
                                                                Boolean endSegmentConnectedByItsStart,
                                                                RoadConnection.ClockwiseBoundType boundType,
                                                                CoordinateSystem2D system)
        Description copied from interface: RoadConnection
        Replies an iterator which loop on the segment in a counterclockwise order from the specified start segment to the specified end segment.

        This function assumes that startSegmentConnectedByItsStart and endSegmentConnectedByItsStart parameters indicates how the segments should be connected. These values are useful to indicates how to iterate when the segment is connected to this RoadConnexion by its two ends. The semantics of the these values are:

        • true, the segment will be replied by the iterator when its start point will be found in the list;
        • false, the segment will be replied by the iterator when its end point will be found in the list;
        • null, the segment will be replied when it will be found at the first time in the list.

        The first segment replied by this function will be the startSegment or the second segment from the list, according to bountType. The last segment replied by this function will be the endSegment or the antepenulvian segment from the list, according to bountType.

        Specified by:
        toCounterclockwiseIterator in interface RoadConnection
        Parameters:
        startSegment - is the first segment to iterate.
        startSegmentConnectedByItsStart - indicates if the start segment is connected by its first point.
        endSegment - is the last segment to iterate.
        endSegmentConnectedByItsStart - indicates if the start segment is connected by its first point.
        boundType - indicates if the two given segments will be included into the iterated segment set.
        system - is the 2D coordinate system used to project a counterclockwise circle.
        Returns:
        the iterator on segments.
      • toCounterclockwiseIterator

        @Pure
        public Iterator<RoadSegment> toCounterclockwiseIterator​(RoadSegment startSegment,
                                                                CoordinateSystem2D system)
        Description copied from interface: RoadConnection
        Replies an iterator which loop on the segment in a counterclockwise order from the specified segment.

        The first segment replied by this function will be the startSegment or the second segment from the list, according to the default clockwhise type. Assuming that the segment candidates should be replied only once time if they are all included, the startSegment will never be replied as the last segment.

        Specified by:
        toCounterclockwiseIterator in interface RoadConnection
        Parameters:
        startSegment - is the first segment to iterate.
        system - is the 2D coordinate system used to project a counterclockwise circle.
        Returns:
        an iterable data structure.
      • toCounterclockwiseIterator

        @Pure
        public Iterator<RoadSegment> toCounterclockwiseIterator​(RoadSegment startSegment,
                                                                RoadConnection.ClockwiseBoundType boundType,
                                                                CoordinateSystem2D system)
        Description copied from interface: RoadConnection
        Replies an iterator which loop on the segment in a counterclockwise order from the specified segment.

        The first segment replied by this function will be the startSegment or the second segment from the list, according to bountType. The last segment replied by this function will be the last or antepenulvian segment from the list, according to bountType.

        Specified by:
        toCounterclockwiseIterator in interface RoadConnection
        Parameters:
        startSegment - is the first segment to iterate.
        boundType - indicates if the two given segments will be included into the iterated segment set.
        system - is the 2D coordinate system used to project a counterclockwise circle.
        Returns:
        an iterable data structure.
      • toClockwiseIterator

        @Pure
        public Iterator<RoadSegment> toClockwiseIterator​(RoadSegment startSegment,
                                                         RoadSegment endSegment)
        Description copied from interface: RoadConnection
        Replies an iterator which loop on the segment in a clockwise order from the first occurrence. of specified start segment to the first occurrence. of the specified end segment.

        This function assumes a CoordinateSystemConstants.GIS_2D

        Specified by:
        toClockwiseIterator in interface RoadConnection
        Parameters:
        startSegment - is the first segment to iterate.
        endSegment - is the last segment to iterate.
        Returns:
        the iterator on segments.
      • toClockwiseIterator

        @Pure
        public Iterator<RoadSegment> toClockwiseIterator​(RoadSegment startSegment,
                                                         Boolean startSegmentConnectedByItsStart,
                                                         RoadSegment endSegment,
                                                         Boolean endSegmentConnectedByItsStart)
        Description copied from interface: RoadConnection
        Replies an iterator which loop on the segment in a clockwise order from the specified start segment to the specified end segment.

        This function assumes that startSegmentConnectedByItsStart and endSegmentConnectedByItsStart parameters indicates how the segments should be connected. These values are useful to indicates how to iterate when the segment is connected to this RoadConnexion by its two ends. The semantics of the these values are:

        • true, the segment will be replied by the iterator when its start point will be found in the list;
        • false, the segment will be replied by the iterator when its end point will be found in the list;
        • null, the segment will be replied when it will be found at the first time in the list.

        The first segment replied by this function will be the startSegment or the second segment from the list, according to the default clockwhise type. The last segment replied by this function will be the endSegment or the antepenulvian segment from the list, according to the default clockwhise type.

        This function assumes a CoordinateSystemConstants.GIS_2D

        Specified by:
        toClockwiseIterator in interface RoadConnection
        Parameters:
        startSegment - is the first segment to iterate (inclusive).
        startSegmentConnectedByItsStart - indicates if the start segment is connected by its first point.
        endSegment - is the last segment to iterate (inclusive).
        endSegmentConnectedByItsStart - indicates if the start segment is connected by its first point.
        Returns:
        the iterator on segments.
      • toClockwiseIterator

        @Pure
        public Iterator<RoadSegment> toClockwiseIterator​(RoadSegment startSegment,
                                                         Boolean startSegmentConnectedByItsStart,
                                                         RoadSegment endSegment,
                                                         Boolean endSegmentConnectedByItsStart,
                                                         RoadConnection.ClockwiseBoundType boundType)
        Description copied from interface: RoadConnection
        Replies an iterator which loop on the segment in a clockwise order from the specified start segment to the specified end segment.

        This function assumes that startSegmentConnectedByItsStart and endSegmentConnectedByItsStart parameters indicates how the segments should be connected. These values are useful to indicates how to iterate when the segment is connected to this RoadConnexion by its two ends. The semantics of the these values are:

        • true, the segment will be replied by the iterator when its start point will be found in the list;
        • false, the segment will be replied by the iterator when its end point will be found in the list;
        • null, the segment will be replied when it will be found at the first time in the list.

        The first segment replied by this function will be the startSegment or the second segment from the list, according to bountType. The last segment replied by this function will be the endSegment or the antepenulvian segment from the list, according to bountType.

        This function assumes a CoordinateSystemConstants.GIS_2D

        Specified by:
        toClockwiseIterator in interface RoadConnection
        Parameters:
        startSegment - is the first segment to iterate.
        startSegmentConnectedByItsStart - indicates if the start segment is connected by its first point.
        endSegment - is the last segment to iterate.
        endSegmentConnectedByItsStart - indicates if the start segment is connected by its first point.
        boundType - indicates if the two given segments will be included into the iterated segment set.
        Returns:
        the iterator on segments.
      • toClockwiseIterator

        @Pure
        public Iterator<RoadSegment> toClockwiseIterator​(RoadSegment startSegment)
        Description copied from interface: RoadConnection
        Replies an iterator which loop on the segment in a clockwise order from the specified segment.

        The first segment replied by this function will be the startSegment or the second segment from the list, according to the default clockwhise type. Assuming that the segment candidates should be replied only once time if they are all included, the startSegment will never be replied as the last segment.

        This function assumes a CoordinateSystemConstants.GIS_2D

        Specified by:
        toClockwiseIterator in interface RoadConnection
        Parameters:
        startSegment - is the first segment to iterate.
        Returns:
        an iterable data structure.
      • toClockwiseIterator

        @Pure
        public Iterator<RoadSegment> toClockwiseIterator​(RoadSegment startSegment,
                                                         RoadConnection.ClockwiseBoundType boundType)
        Description copied from interface: RoadConnection
        Replies an iterator which loop on the segment in a clockwise order from the specified segment.

        The first segment replied by this function will be the startSegment or the second segment from the list, according to bountType. The last segment replied by this function will be the last or antepenulvian segment from the list, according to bountType.

        This function assumes a CoordinateSystemConstants.GIS_2D

        Specified by:
        toClockwiseIterator in interface RoadConnection
        Parameters:
        startSegment - is the first segment to iterate.
        boundType - indicates if the two given segments will be included into the iterated segment set.
        Returns:
        an iterable data structure.
      • toClockwiseIterator

        @Pure
        public Iterator<RoadSegment> toClockwiseIterator​(RoadSegment startSegment,
                                                         RoadSegment endSegment,
                                                         CoordinateSystem2D system)
        Description copied from interface: RoadConnection
        Replies an iterator which loop on the segment in a clockwise order from the first occurrence. of specified start segment to the first occurrence. of the specified end segment.
        Specified by:
        toClockwiseIterator in interface RoadConnection
        Parameters:
        startSegment - is the first segment to iterate.
        endSegment - is the last segment to iterate.
        system - is the 2D coordinate system used to project a clockwise circle.
        Returns:
        the iterator on segments.
      • toClockwiseIterator

        @Pure
        public Iterator<RoadSegment> toClockwiseIterator​(RoadSegment startSegment,
                                                         Boolean startSegmentConnectedByItsStart,
                                                         RoadSegment endSegment,
                                                         Boolean endSegmentConnectedByItsStart,
                                                         CoordinateSystem2D system)
        Description copied from interface: RoadConnection
        Replies an iterator which loop on the segment in a clockwise order from the specified start segment to the specified end segment.

        This function assumes that startSegmentConnectedByItsStart and endSegmentConnectedByItsStart parameters indicates how the segments should be connected. These values are useful to indicates how to iterate when the segment is connected to this RoadConnexion by its two ends. The semantics of the these values are:

        • true, the segment will be replied by the iterator when its start point will be found in the list;
        • false, the segment will be replied by the iterator when its end point will be found in the list;
        • null, the segment will be replied when it will be found at the first time in the list.

        The first segment replied by this function will be the startSegment or the second segment from the list, according to the default clockwhise type. The last segment replied by this function will be the endSegment or the antepenulvian segment from the list, according to the default clockwhise type.

        Specified by:
        toClockwiseIterator in interface RoadConnection
        Parameters:
        startSegment - is the first segment to iterate (inclusive).
        startSegmentConnectedByItsStart - indicates if the start segment is connected by its first point.
        endSegment - is the last segment to iterate (inclusive).
        endSegmentConnectedByItsStart - indicates if the start segment is connected by its first point.
        system - is the 2D coordinate system used to project a clockwise circle.
        Returns:
        the iterator on segments.
      • toClockwiseIterator

        @Pure
        public Iterator<RoadSegment> toClockwiseIterator​(RoadSegment startSegment,
                                                         RoadSegment endSegment,
                                                         RoadConnection.ClockwiseBoundType boundType,
                                                         CoordinateSystem2D system)
        Description copied from interface: RoadConnection
        Replies an iterator which loop on the segment in a clockwise order from the first occurrence. of specified start segment to the first occurrence. of the specified end segment.
        Specified by:
        toClockwiseIterator in interface RoadConnection
        Parameters:
        startSegment - is the first segment to iterate.
        endSegment - is the last segment to iterate.
        boundType - indicates if the two given segments will be included into the iterated segment set.
        system - is the 2D coordinate system used to project a clockwise circle.
        Returns:
        the iterator on segments.
      • toClockwiseIterator

        @Pure
        public Iterator<RoadSegment> toClockwiseIterator​(RoadSegment startSegment,
                                                         Boolean startSegmentConnectedByItsStart,
                                                         RoadSegment endSegment,
                                                         Boolean endSegmentConnectedByItsStart,
                                                         RoadConnection.ClockwiseBoundType boundType,
                                                         CoordinateSystem2D system)
        Description copied from interface: RoadConnection
        Replies an iterator which loop on the segment in a clockwise order from the specified start segment to the specified end segment.

        This function assumes that startSegmentConnectedByItsStart and endSegmentConnectedByItsStart parameters indicates how the segments should be connected. These values are useful to indicates how to iterate when the segment is connected to this RoadConnexion by its two ends. The semantics of the these values are:

        • true, the segment will be replied by the iterator when its start point will be found in the list;
        • false, the segment will be replied by the iterator when its end point will be found in the list;
        • null, the segment will be replied when it will be found at the first time in the list.

        The first segment replied by this function will be the startSegment or the second segment from the list, according to bountType. The last segment replied by this function will be the endSegment or the antepenulvian segment from the list, according to bountType.

        Specified by:
        toClockwiseIterator in interface RoadConnection
        Parameters:
        startSegment - is the first segment to iterate.
        startSegmentConnectedByItsStart - indicates if the start segment is connected by its first point.
        endSegment - is the last segment to iterate.
        endSegmentConnectedByItsStart - indicates if the start segment is connected by its first point.
        boundType - indicates if the two given segments will be included into the iterated segment set.
        system - is the 2D coordinate system used to project a clockwise circle.
        Returns:
        the iterator on segments.
      • toClockwiseIterator

        @Pure
        public Iterator<RoadSegment> toClockwiseIterator​(RoadSegment startSegment,
                                                         CoordinateSystem2D system)
        Description copied from interface: RoadConnection
        Replies an iterator which loop on the segment in a clockwise order from the specified segment.

        The first segment replied by this function will be the startSegment or the second segment from the list, according to the default clockwhise type. Assuming that the segment candidates should be replied only once time if they are all included, the startSegment will never be replied as the last segment.

        Specified by:
        toClockwiseIterator in interface RoadConnection
        Parameters:
        startSegment - is the first segment to iterate.
        system - is the 2D coordinate system used to project a clockwise circle.
        Returns:
        an iterable data structure.
      • toClockwiseIterator

        @Pure
        public Iterator<RoadSegment> toClockwiseIterator​(RoadSegment startSegment,
                                                         RoadConnection.ClockwiseBoundType boundType,
                                                         CoordinateSystem2D system)
        Description copied from interface: RoadConnection
        Replies an iterator which loop on the segment in a clockwise order from the specified segment.

        The first segment replied by this function will be the startSegment or the second segment from the list, according to bountType. The last segment replied by this function will be the last or antepenulvian segment from the list, according to bountType.

        Specified by:
        toClockwiseIterator in interface RoadConnection
        Parameters:
        startSegment - is the first segment to iterate.
        boundType - indicates if the two given segments will be included into the iterated segment set.
        system - is the 2D coordinate system used to project a clockwise circle.
        Returns:
        an iterable data structure.
      • compareTo

        @Pure
        public int compareTo​(Point2D<?,​?> pts)
        Description copied from interface: RoadConnection
        Compares this object with the specified point for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified point.
        Specified by:
        compareTo in interface RoadConnection
        Parameters:
        pts - is the object to be compared.
        Returns:
        a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified point.