Class SubRoadNetwork.TerminalConnection
- java.lang.Object
-
- org.arakhne.afc.gis.road.primitive.AbstractWrapRoadConnection
-
- org.arakhne.afc.gis.road.SubRoadNetwork.AbstractWrapConnection
-
- org.arakhne.afc.gis.road.SubRoadNetwork.TerminalConnection
-
- All Implemented Interfaces:
Comparable<GraphPoint<RoadConnection,RoadSegment>>,RoadConnection,GraphPoint<RoadConnection,RoadSegment>,GraphPoint.GraphPointConnection<RoadConnection,RoadSegment>
- Enclosing class:
- SubRoadNetwork
class SubRoadNetwork.TerminalConnection extends SubRoadNetwork.AbstractWrapConnection implements GraphPoint.GraphPointConnection<RoadConnection,RoadSegment>
Internal connection.- Since:
- 14.0
- Version:
- 17.0 2020-01-04 14:41:55
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.gis
- Maven Artifact Id:
- gisroad
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.arakhne.afc.math.graph.GraphPoint
GraphPoint.GraphPointConnection<PT extends GraphPoint<PT,ST>,ST extends GraphSegment<ST,PT>>
-
Nested classes/interfaces inherited from interface org.arakhne.afc.gis.road.primitive.RoadConnection
RoadConnection.ClockwiseBoundType
-
-
Field Summary
-
Fields inherited from class org.arakhne.afc.gis.road.primitive.AbstractWrapRoadConnection
connection
-
Fields inherited from interface org.arakhne.afc.gis.road.primitive.RoadConnection
DEFAULT_CLOCKWHISE_TYPE
-
-
Constructor Summary
Constructors Constructor Description TerminalConnection(RoadConnection connection, RoadSegment segment, boolean connectedToStart)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RoadSegmentgetConnectedSegment(int index)Replies the connected segment at the specified index.intgetConnectedSegmentCount()Replies the count of segments connected to this point.List<RoadSegment>getConnectedSegments()Replies the list of segments connected to this point.List<RoadSegment>getConnectedSegmentsStartingFrom(RoadSegment startingSegment)Replies the list of segments connected to this point.Iterable<RoadSegment>getConnectedSegmentsStartingFromInReverseOrder(RoadSegment startingSegment)Replies the list of segments connected to this point in reverse order.Iterable<? extends GraphPoint.GraphPointConnection<RoadConnection,RoadSegment>>getConnections()Replies the list of segment connections for this point.Iterable<? extends GraphPoint.GraphPointConnection<RoadConnection,RoadSegment>>getConnectionsStartingFrom(RoadSegment startingPoint)Replies the list of segment connections for this point.Iterable<? extends GraphPoint.GraphPointConnection<RoadConnection,RoadSegment>>getConnectionsStartingFromInReverseOrder(RoadSegment startingPoint)Replies the list of segment connections for this point in reverse order.RoadConnectiongetGraphPoint()Replies the connection point.RoadSegmentgetGraphSegment()Replies the connected segment.RoadSegmentgetOtherSideSegment(RoadSegment ref_segment)Replies the other segment also connected to this point.booleanisConnectedSegment(RoadSegment sgmt)Replies if the specified segment was connected to this point.booleanisFinalConnectionPoint()Replies if this point is a final connection point ie, a point connected to only one segment.booleanisSegmentStartConnected()Replies if the connected segment is connected by its start point or not.Iterator<RoadSegment>toClockwiseIterator(RoadSegment startSegment)Replies an iterator which loop on the segment in a clockwise order from the specified segment.Iterator<RoadSegment>toClockwiseIterator(RoadSegment startSegment, Boolean startSegmentConnectedByItsStart, RoadSegment endSegment, Boolean endSegmentConnectedByItsStart)Replies an iterator which loop on the segment in a clockwise order from the specified start segment to the specified end segment.Iterator<RoadSegment>toClockwiseIterator(RoadSegment startSegment, Boolean startSegmentConnectedByItsStart, RoadSegment endSegment, Boolean endSegmentConnectedByItsStart, RoadConnection.ClockwiseBoundType boundType)Replies an iterator which loop on the segment in a clockwise order from the specified start segment to the specified end segment.Iterator<RoadSegment>toClockwiseIterator(RoadSegment startSegment, Boolean startSegmentConnectedByItsStart, RoadSegment endSegment, Boolean endSegmentConnectedByItsStart, RoadConnection.ClockwiseBoundType boundType, CoordinateSystem2D system)Replies an iterator which loop on the segment in a clockwise order from the specified start segment to the specified end segment.Iterator<RoadSegment>toClockwiseIterator(RoadSegment startSegment, Boolean startSegmentConnectedByItsStart, RoadSegment endSegment, Boolean endSegmentConnectedByItsStart, CoordinateSystem2D system)Replies an iterator which loop on the segment in a clockwise order from the specified start segment to the specified end segment.Iterator<RoadSegment>toClockwiseIterator(RoadSegment startSegment, RoadConnection.ClockwiseBoundType boundType)Replies an iterator which loop on the segment in a clockwise order from the specified segment.Iterator<RoadSegment>toClockwiseIterator(RoadSegment startSegment, RoadConnection.ClockwiseBoundType boundType, CoordinateSystem2D system)Replies an iterator which loop on the segment in a clockwise order from the specified segment.Iterator<RoadSegment>toClockwiseIterator(RoadSegment startSegment, RoadSegment endSegment)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.Iterator<RoadSegment>toClockwiseIterator(RoadSegment startSegment, RoadSegment endSegment, RoadConnection.ClockwiseBoundType boundType)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.Iterator<RoadSegment>toClockwiseIterator(RoadSegment startSegment, RoadSegment endSegment, RoadConnection.ClockwiseBoundType boundType, CoordinateSystem2D system)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.Iterator<RoadSegment>toClockwiseIterator(RoadSegment startSegment, RoadSegment endSegment, CoordinateSystem2D system)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.Iterator<RoadSegment>toClockwiseIterator(RoadSegment startSegment, CoordinateSystem2D system)Replies an iterator which loop on the segment in a clockwise order from the specified segment.Iterator<RoadSegment>toCounterclockwiseIterator(RoadSegment startSegment)Replies an iterator which loop on the segment in a counterclockwise order from the specified segment.Iterator<RoadSegment>toCounterclockwiseIterator(RoadSegment startSegment, Boolean startSegmentConnectedByItsStart, RoadSegment endSegment, Boolean endSegmentConnectedByItsStart)Replies an iterator which loop on the segment in a counterclockwise order from the specified start segment to the specified end segment.Iterator<RoadSegment>toCounterclockwiseIterator(RoadSegment startSegment, Boolean startSegmentConnectedByItsStart, RoadSegment endSegment, Boolean endSegmentConnectedByItsStart, RoadConnection.ClockwiseBoundType boundType)Replies an iterator which loop on the segment in a counterclockwise order from the specified start segment to the specified end segment.Iterator<RoadSegment>toCounterclockwiseIterator(RoadSegment startSegment, Boolean startSegmentConnectedByItsStart, RoadSegment endSegment, Boolean endSegmentConnectedByItsStart, RoadConnection.ClockwiseBoundType boundType, CoordinateSystem2D system)Replies an iterator which loop on the segment in a counterclockwise order from the specified start segment to the specified end segment.Iterator<RoadSegment>toCounterclockwiseIterator(RoadSegment startSegment, Boolean startSegmentConnectedByItsStart, RoadSegment endSegment, Boolean endSegmentConnectedByItsStart, CoordinateSystem2D system)Replies an iterator which loop on the segment in a counterclockwise order from the specified start segment to the specified end segment.Iterator<RoadSegment>toCounterclockwiseIterator(RoadSegment startSegment, RoadConnection.ClockwiseBoundType boundType)Replies an iterator which loop on the segment in a counterclockwise order from the specified segment.Iterator<RoadSegment>toCounterclockwiseIterator(RoadSegment startSegment, RoadConnection.ClockwiseBoundType boundType, CoordinateSystem2D system)Replies an iterator which loop on the segment in a counterclockwise order from the specified segment.Iterator<RoadSegment>toCounterclockwiseIterator(RoadSegment startSegment, RoadSegment endSegment)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.Iterator<RoadSegment>toCounterclockwiseIterator(RoadSegment startSegment, RoadSegment endSegment, RoadConnection.ClockwiseBoundType boundType)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.Iterator<RoadSegment>toCounterclockwiseIterator(RoadSegment startSegment, RoadSegment endSegment, RoadConnection.ClockwiseBoundType boundType, CoordinateSystem2D system)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.Iterator<RoadSegment>toCounterclockwiseIterator(RoadSegment startSegment, RoadSegment endSegment, CoordinateSystem2D system)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.Iterator<RoadSegment>toCounterclockwiseIterator(RoadSegment startSegment, CoordinateSystem2D system)Replies an iterator which loop on the segment in a counterclockwise order from the specified segment.StringtoString()-
Methods inherited from class org.arakhne.afc.gis.road.primitive.AbstractWrapRoadConnection
compareTo, compareTo, equals, getGeoLocation, getPoint, getUUID, getWrappedRoadConnection, hashCode, isEmpty, isNearPoint, isReallyCulDeSac
-
-
-
-
Constructor Detail
-
TerminalConnection
TerminalConnection(RoadConnection connection, RoadSegment segment, boolean connectedToStart)
Constructor.- Parameters:
connection- the wrapped connection.segment- the segment.connectedToStart- indicates if the segment is connected to its start.
-
-
Method Detail
-
getConnectedSegment
@Pure public final RoadSegment getConnectedSegment(int index) throws ArrayIndexOutOfBoundsException
Description copied from interface:RoadConnectionReplies the connected segment at the specified index.- Specified by:
getConnectedSegmentin interfaceRoadConnection- Parameters:
index- is the index of the segment to remove.- Returns:
- the connected segment at the given index
- Throws:
ArrayIndexOutOfBoundsException- in case of error.
-
getConnectedSegmentCount
@Pure public final int getConnectedSegmentCount()
Description copied from interface:GraphPointReplies the count of segments connected to this point.- Specified by:
getConnectedSegmentCountin interfaceGraphPoint<RoadConnection,RoadSegment>- Specified by:
getConnectedSegmentCountin interfaceRoadConnection- Returns:
- the count of segments connected to this point.
-
getConnectedSegments
@Pure public final List<RoadSegment> getConnectedSegments()
Description copied from interface:GraphPointReplies the list of segments connected to this point.- Specified by:
getConnectedSegmentsin interfaceGraphPoint<RoadConnection,RoadSegment>- Specified by:
getConnectedSegmentsin interfaceRoadConnection- Returns:
- the list of segments connected to this point.
-
getConnectedSegmentsStartingFrom
@Pure public final List<RoadSegment> getConnectedSegmentsStartingFrom(RoadSegment startingSegment)
Description copied from interface:GraphPointReplies the list of segments connected to this point.If the graph point implementation is supporting an ordered list of segment, it will reply the segments starting from the given segment. If the implementation does not support any order, it will reply the same as
GraphPoint.getConnectedSegments().- Specified by:
getConnectedSegmentsStartingFromin interfaceGraphPoint<RoadConnection,RoadSegment>- Specified by:
getConnectedSegmentsStartingFromin interfaceRoadConnection- Parameters:
startingSegment- the startint point.- Returns:
- the list of segments connected to this point.
-
getConnectedSegmentsStartingFromInReverseOrder
public Iterable<RoadSegment> getConnectedSegmentsStartingFromInReverseOrder(RoadSegment startingSegment)
Description copied from interface:GraphPointReplies the list of segments connected to this point in reverse order.If the graph point implementation is supporting an ordered list of segment, it will reply the segments starting from the given segment. If the implementation does not support any order, it will reply the same as
GraphPoint.getConnectedSegments()in reverse order.- Specified by:
getConnectedSegmentsStartingFromInReverseOrderin interfaceGraphPoint<RoadConnection,RoadSegment>- Parameters:
startingSegment- the startint segment.- Returns:
- the list of segments connected to this point.
-
getOtherSideSegment
@Pure public final RoadSegment getOtherSideSegment(RoadSegment ref_segment)
Description copied from interface:RoadConnectionReplies the other segment also connected to this point. If more than 2 segments were connected to this point, this function repliesnull.- Specified by:
getOtherSideSegmentin interfaceRoadConnection- Overrides:
getOtherSideSegmentin classSubRoadNetwork.AbstractWrapConnection- 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.
-
isConnectedSegment
@Pure public final boolean isConnectedSegment(RoadSegment sgmt)
Description copied from interface:GraphPointReplies if the specified segment was connected to this point.- Specified by:
isConnectedSegmentin interfaceGraphPoint<RoadConnection,RoadSegment>- Specified by:
isConnectedSegmentin interfaceRoadConnection- Parameters:
sgmt- the starting point.- Returns:
trueif the given segment is connected to this node, otherwisefalse
-
isFinalConnectionPoint
@Pure public final boolean isFinalConnectionPoint()
Description copied from interface:RoadConnectionReplies if this point is a final connection point ie, a point connected to only one segment.The difference between
RoadConnection.isReallyCulDeSac()andRoadConnection.isFinalConnectionPoint()is on the treatement of sub-road-network elements.RoadConnection.isFinalConnectionPoint()takes into account only the current (sub)-road network.RoadConnection.isReallyCulDeSac()takes into account only the top-most road network element. See the following table for details:Inside RoadNetwork # Connected Segments at Top-Level Inside SubRoadNetwork # Connected Segments at Lower-Level isFinalConnectionPoint isReallyCulDeSac true 1 false n/a truetruetrue n false n/a falsefalsetrue 1 true 1 truetruetrue n true 1 truefalsetrue n true m<=n falsefalse- Specified by:
isFinalConnectionPointin interfaceGraphPoint<RoadConnection,RoadSegment>- Specified by:
isFinalConnectionPointin interfaceRoadConnection- Overrides:
isFinalConnectionPointin classAbstractWrapRoadConnection- Returns:
trueif zero or one segment was connected to this point, otherwisefalse- See Also:
RoadConnection.isReallyCulDeSac()
-
getConnections
@Pure public Iterable<? extends GraphPoint.GraphPointConnection<RoadConnection,RoadSegment>> getConnections()
Description copied from interface:GraphPointReplies the list of segment connections for this point.- Specified by:
getConnectionsin interfaceGraphPoint<RoadConnection,RoadSegment>- Returns:
- the list of segments connected to this point.
-
getConnectionsStartingFrom
@Pure public Iterable<? extends GraphPoint.GraphPointConnection<RoadConnection,RoadSegment>> getConnectionsStartingFrom(RoadSegment startingPoint)
Description copied from interface:GraphPointReplies the list of segment connections for this point.If the graph point implementation is supporting an ordered list of segment, it will reply the segments starting from the given segment. If the implementation does not support any order, it will reply the same as
GraphPoint.getConnections().- Specified by:
getConnectionsStartingFromin interfaceGraphPoint<RoadConnection,RoadSegment>- Parameters:
startingPoint- the starting point.- Returns:
- the list of segments connected to this point.
-
getConnectionsStartingFromInReverseOrder
@Pure public Iterable<? extends GraphPoint.GraphPointConnection<RoadConnection,RoadSegment>> getConnectionsStartingFromInReverseOrder(RoadSegment startingPoint)
Description copied from interface:GraphPointReplies the list of segment connections for this point in reverse order.If the graph point implementation is supporting an ordered list of segment, it will reply the segments starting from the given segment. If the implementation does not support any order, it will reply the same as
GraphPoint.getConnections().- Specified by:
getConnectionsStartingFromInReverseOrderin interfaceGraphPoint<RoadConnection,RoadSegment>- Parameters:
startingPoint- the starting point.- Returns:
- the list of segments connected to this point.
-
toClockwiseIterator
@Pure public final Iterator<RoadSegment> toClockwiseIterator(RoadSegment startSegment, RoadSegment endSegment)
Description copied from interface:RoadConnectionReplies 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:
toClockwiseIteratorin interfaceRoadConnection- Parameters:
startSegment- is the first segment to iterate.endSegment- is the last segment to iterate.- Returns:
- the iterator on segments.
-
toClockwiseIterator
@Pure public final Iterator<RoadSegment> toClockwiseIterator(RoadSegment startSegment, Boolean startSegmentConnectedByItsStart, RoadSegment endSegment, Boolean endSegmentConnectedByItsStart)
Description copied from interface:RoadConnectionReplies 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 thedefault clockwhise type.This function assumes a
CoordinateSystemConstants.GIS_2D- Specified by:
toClockwiseIteratorin interfaceRoadConnection- 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 final Iterator<RoadSegment> toClockwiseIterator(RoadSegment startSegment, RoadSegment endSegment, RoadConnection.ClockwiseBoundType boundType)
Description copied from interface:RoadConnectionReplies 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:
toClockwiseIteratorin interfaceRoadConnection- 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.- Returns:
- the iterator on segments.
-
toClockwiseIterator
@Pure public final Iterator<RoadSegment> toClockwiseIterator(RoadSegment startSegment, Boolean startSegmentConnectedByItsStart, RoadSegment endSegment, Boolean endSegmentConnectedByItsStart, RoadConnection.ClockwiseBoundType boundType)
Description copied from interface:RoadConnectionReplies 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:
toClockwiseIteratorin interfaceRoadConnection- 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 final Iterator<RoadSegment> toClockwiseIterator(RoadSegment startSegment)
Description copied from interface:RoadConnectionReplies 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:
toClockwiseIteratorin interfaceRoadConnection- Parameters:
startSegment- is the first segment to iterate.- Returns:
- an iterable data structure.
-
toClockwiseIterator
@Pure public final Iterator<RoadSegment> toClockwiseIterator(RoadSegment startSegment, RoadConnection.ClockwiseBoundType boundType)
Description copied from interface:RoadConnectionReplies 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:
toClockwiseIteratorin interfaceRoadConnection- 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 final Iterator<RoadSegment> toClockwiseIterator(RoadSegment startSegment, RoadSegment endSegment, CoordinateSystem2D system)
Description copied from interface:RoadConnectionReplies 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:
toClockwiseIteratorin interfaceRoadConnection- 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 final Iterator<RoadSegment> toClockwiseIterator(RoadSegment startSegment, Boolean startSegmentConnectedByItsStart, RoadSegment endSegment, Boolean endSegmentConnectedByItsStart, CoordinateSystem2D system)
Description copied from interface:RoadConnectionReplies 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 thedefault clockwhise type.- Specified by:
toClockwiseIteratorin interfaceRoadConnection- 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 final Iterator<RoadSegment> toClockwiseIterator(RoadSegment startSegment, RoadSegment endSegment, RoadConnection.ClockwiseBoundType boundType, CoordinateSystem2D system)
Description copied from interface:RoadConnectionReplies 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:
toClockwiseIteratorin interfaceRoadConnection- 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 final Iterator<RoadSegment> toClockwiseIterator(RoadSegment startSegment, Boolean startSegmentConnectedByItsStart, RoadSegment endSegment, Boolean endSegmentConnectedByItsStart, RoadConnection.ClockwiseBoundType boundType, CoordinateSystem2D system)
Description copied from interface:RoadConnectionReplies 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:
toClockwiseIteratorin interfaceRoadConnection- 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 final Iterator<RoadSegment> toClockwiseIterator(RoadSegment startSegment, CoordinateSystem2D system)
Description copied from interface:RoadConnectionReplies 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:
toClockwiseIteratorin interfaceRoadConnection- 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 final Iterator<RoadSegment> toClockwiseIterator(RoadSegment startSegment, RoadConnection.ClockwiseBoundType boundType, CoordinateSystem2D system)
Description copied from interface:RoadConnectionReplies 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:
toClockwiseIteratorin interfaceRoadConnection- 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.
-
toCounterclockwiseIterator
@Pure public final Iterator<RoadSegment> toCounterclockwiseIterator(RoadSegment startSegment, RoadSegment endSegment)
Description copied from interface:RoadConnectionReplies 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:
toCounterclockwiseIteratorin interfaceRoadConnection- Parameters:
startSegment- is the first segment to iterate.endSegment- is the last segment to iterate.- Returns:
- the iterator on segments.
-
toCounterclockwiseIterator
@Pure public final Iterator<RoadSegment> toCounterclockwiseIterator(RoadSegment startSegment, Boolean startSegmentConnectedByItsStart, RoadSegment endSegment, Boolean endSegmentConnectedByItsStart)
Description copied from interface:RoadConnectionReplies 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 thedefault clockwhise type.This function assumes a
CoordinateSystemConstants.GIS_2D- Specified by:
toCounterclockwiseIteratorin interfaceRoadConnection- 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 final Iterator<RoadSegment> toCounterclockwiseIterator(RoadSegment startSegment, RoadSegment endSegment, RoadConnection.ClockwiseBoundType boundType)
Description copied from interface:RoadConnectionReplies 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:
toCounterclockwiseIteratorin interfaceRoadConnection- 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.- Returns:
- the iterator on segments.
-
toCounterclockwiseIterator
@Pure public final Iterator<RoadSegment> toCounterclockwiseIterator(RoadSegment startSegment, Boolean startSegmentConnectedByItsStart, RoadSegment endSegment, Boolean endSegmentConnectedByItsStart, RoadConnection.ClockwiseBoundType boundType)
Description copied from interface:RoadConnectionReplies 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:
toCounterclockwiseIteratorin interfaceRoadConnection- 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 final Iterator<RoadSegment> toCounterclockwiseIterator(RoadSegment startSegment)
Description copied from interface:RoadConnectionReplies 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:
toCounterclockwiseIteratorin interfaceRoadConnection- Parameters:
startSegment- is the first segment to iterate.- Returns:
- an iterable data structure.
-
toCounterclockwiseIterator
@Pure public final Iterator<RoadSegment> toCounterclockwiseIterator(RoadSegment startSegment, RoadConnection.ClockwiseBoundType boundType)
Description copied from interface:RoadConnectionReplies 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:
toCounterclockwiseIteratorin interfaceRoadConnection- 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 final Iterator<RoadSegment> toCounterclockwiseIterator(RoadSegment startSegment, RoadSegment endSegment, CoordinateSystem2D system)
Description copied from interface:RoadConnectionReplies 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:
toCounterclockwiseIteratorin interfaceRoadConnection- 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 final Iterator<RoadSegment> toCounterclockwiseIterator(RoadSegment startSegment, Boolean startSegmentConnectedByItsStart, RoadSegment endSegment, Boolean endSegmentConnectedByItsStart, CoordinateSystem2D system)
Description copied from interface:RoadConnectionReplies 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 thedefault clockwhise type.- Specified by:
toCounterclockwiseIteratorin interfaceRoadConnection- 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 final Iterator<RoadSegment> toCounterclockwiseIterator(RoadSegment startSegment, RoadSegment endSegment, RoadConnection.ClockwiseBoundType boundType, CoordinateSystem2D system)
Description copied from interface:RoadConnectionReplies 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:
toCounterclockwiseIteratorin interfaceRoadConnection- 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 final Iterator<RoadSegment> toCounterclockwiseIterator(RoadSegment startSegment, Boolean startSegmentConnectedByItsStart, RoadSegment endSegment, Boolean endSegmentConnectedByItsStart, RoadConnection.ClockwiseBoundType boundType, CoordinateSystem2D system)
Description copied from interface:RoadConnectionReplies 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:
toCounterclockwiseIteratorin interfaceRoadConnection- 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 final Iterator<RoadSegment> toCounterclockwiseIterator(RoadSegment startSegment, CoordinateSystem2D system)
Description copied from interface:RoadConnectionReplies 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:
toCounterclockwiseIteratorin interfaceRoadConnection- 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 final Iterator<RoadSegment> toCounterclockwiseIterator(RoadSegment startSegment, RoadConnection.ClockwiseBoundType boundType, CoordinateSystem2D system)
Description copied from interface:RoadConnectionReplies 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:
toCounterclockwiseIteratorin interfaceRoadConnection- 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.
-
toString
@Pure public String toString()
- Overrides:
toStringin classSubRoadNetwork.AbstractWrapConnection
-
getGraphPoint
@Pure public RoadConnection getGraphPoint()
Description copied from interface:GraphPoint.GraphPointConnectionReplies the connection point.- Specified by:
getGraphPointin interfaceGraphPoint.GraphPointConnection<RoadConnection,RoadSegment>- Returns:
- the connection point.
-
getGraphSegment
@Pure public RoadSegment getGraphSegment()
Description copied from interface:GraphPoint.GraphPointConnectionReplies the connected segment.- Specified by:
getGraphSegmentin interfaceGraphPoint.GraphPointConnection<RoadConnection,RoadSegment>- Returns:
- the connected segment.
-
isSegmentStartConnected
@Pure public boolean isSegmentStartConnected()
Description copied from interface:GraphPoint.GraphPointConnectionReplies if the connected segment is connected by its start point or not.- Specified by:
isSegmentStartConnectedin interfaceGraphPoint.GraphPointConnection<RoadConnection,RoadSegment>- Returns:
trueif the segment replied byGraphPoint.GraphPointConnection.getGraphSegment()is connected to the point replied byGraphPoint.GraphPointConnection.getGraphPoint()by its start end, otherwisefalse
-
-