- java.lang.Object
-
- org.arakhne.afc.gis.road.StandardRoadConnection
-
- All Implemented Interfaces:
Comparable<GraphPoint<RoadConnection,RoadSegment>>
,RoadConnection
,GraphPoint<RoadConnection,RoadSegment>
class StandardRoadConnection extends Object implements RoadConnection
This class represents the connection point inside a road network.A RoadConnection is a point that permits to link several road. Two RoadConnections are assumed to be the same if they have the same position.
- 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 Modifier and Type Class Description protected class
StandardRoadConnection.Connection
This class represents the information on a connected segment.protected static interface
StandardRoadConnection.IClockwiseIterator
Iterator that replies the segments connected to the associated point in a counterclockwise order.-
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 interface org.arakhne.afc.gis.road.primitive.RoadConnection
DEFAULT_CLOCKWHISE_TYPE
-
-
Constructor Summary
Constructors Constructor Description StandardRoadConnection()
Create a new road connection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
addConnectedSegment(RoadPolyline segment, boolean attachToStartPoint)
Add a segment to this connection point.protected void
addListeningIterator(StandardRoadConnection.IClockwiseIterator iterator)
Add a listening iterator.int
compareTo(Point2D<?,?> pts)
Compares this object with the specified point for order.int
compareTo(GraphPoint<RoadConnection,RoadSegment> other)
boolean
equals(Object obj)
protected void
fireIteratorUpdate()
Notify the iterators about changes.RoadSegment
getConnectedSegment(int index)
Replies the connected segment at the specified index.int
getConnectedSegmentCount()
Replies the count of segments connected to this point.Iterable<RoadSegment>
getConnectedSegments()
Replies the list of segments connected to this point.Iterable<RoadSegment>
getConnectedSegmentsStartingFrom(RoadSegment startingSegment)
Replies the list of segments connected to this point.Iterable<RoadSegment>
getConnectedSegmentsStartingFromInReverseOrder(RoadSegment startingPoint)
Replies the list of segments connected to this point in reverse order.protected StandardRoadConnection.Connection
getConnectionInfo(int index)
Replies all the information about a connection to a segment.Iterable<? extends GraphPoint.GraphPointConnection<RoadConnection,RoadSegment>>
getConnections()
Replies the list of segment connections for this point.Iterable<? extends GraphPoint.GraphPointConnection<RoadConnection,RoadSegment>>
getConnectionsStartingFrom(RoadSegment startingSegment)
Replies the list of segment connections for this point.Iterable<? extends GraphPoint.GraphPointConnection<RoadConnection,RoadSegment>>
getConnectionsStartingFromInReverseOrder(RoadSegment startingSegment)
Replies the list of segment connections for this point in reverse order.GeoLocationPoint
getGeoLocation()
Replies the geographic coordinates of this road connection.RoadSegment
getOtherSideSegment(RoadSegment ref_segment)
Replies the other segment also connected to this point.Point2d
getPoint()
Replies the coordinates of this road connection.UUID
getUUID()
Replies an unique identifier for element.RoadConnection
getWrappedRoadConnection()
Replies the wrapped road connection if this object is a wrapper to another road connection.int
hashCode()
boolean
isConnectedSegment(RoadSegment segment)
Replies if the specified segment was connected to this point.boolean
isEmpty()
Replies if this connection has no connected segment.boolean
isFinalConnectionPoint()
Replies if this point is a final connection point ie, a point connected to only one segment.boolean
isNearPoint(Point2D<?,?> point)
Replies if the specified point is near this connection point.boolean
isReallyCulDeSac()
Replies if this point is a cul-de-sac.(package private) int
removeConnectedSegment(RoadSegment segment, boolean attachToStartPoint)
Remove a connection with a segment.protected void
removeListeningIterator(StandardRoadConnection.IClockwiseIterator iterator)
Remove a listening iterator.(package private) void
setPosition(Point2D<?,?> position)
Set the temporary buffer of the position of the road connection.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 startConnection, RoadSegment endSegment, Boolean endConnection, 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 startConnection, RoadSegment endSegment, Boolean endConnection, 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 startConnection, RoadSegment endSegment, Boolean endConnection, 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 startConnection, RoadSegment endSegment, Boolean endConnection, 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.String
toString()
-
-
-
Constructor Detail
-
StandardRoadConnection
StandardRoadConnection()
Create a new road connection.A RoadConnection must be created thru a
RoadNetwork
.
-
-
Method Detail
-
getWrappedRoadConnection
@Pure public final 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 interfaceRoadConnection
- Returns:
- the wrapped road connection or this road connection itself.
-
compareTo
@Pure public int compareTo(GraphPoint<RoadConnection,RoadSegment> other)
- Specified by:
compareTo
in interfaceComparable<GraphPoint<RoadConnection,RoadSegment>>
-
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 interfaceRoadConnection
- 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.
-
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 interfaceRoadConnection
- 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 interfaceRoadConnection
- 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 interfaceRoadConnection
- 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 interfaceRoadConnection
- Returns:
- the geographic coordinates of this road connection.
-
setPosition
void setPosition(Point2D<?,?> position)
Set the temporary buffer of the position of the road connection.- Parameters:
position
- a position.- Since:
- 4.0
-
addConnectedSegment
void addConnectedSegment(RoadPolyline segment, boolean attachToStartPoint)
Add a segment to this connection point.The segments are ordered according to there geo-localization along a trigonometric cicle. The first segment has the nearest angle to the vector (1,0), and the following segments are ordered according to the positive value of there angles to this unity vector (counterclockwise order).
- Parameters:
segment
- is the segment to add.attachToStartPoint
- indicates if the segment must be attached by its start point (if value istrue
) or by its end point (if value isfalse
).
-
removeConnectedSegment
int removeConnectedSegment(RoadSegment segment, boolean attachToStartPoint)
Remove a connection with a segment.- Parameters:
segment
- is the segment to remove.attachToStartPoint
- indicates if the segment is attached by its start point (if value istrue
) or by its end point- Returns:
- the index of the removed segment, or
-1
if none was found
-
getConnectedSegmentCount
@Pure public int getConnectedSegmentCount()
Description copied from interface:GraphPoint
Replies the count of segments connected to this point.- Specified by:
getConnectedSegmentCount
in interfaceGraphPoint<RoadConnection,RoadSegment>
- Specified by:
getConnectedSegmentCount
in interfaceRoadConnection
- Returns:
- the count of segments connected to this point.
-
getConnectedSegment
@Pure public RoadSegment getConnectedSegment(int index) throws ArrayIndexOutOfBoundsException
Description copied from interface:RoadConnection
Replies the connected segment at the specified index.- Specified by:
getConnectedSegment
in 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.
-
getConnectionInfo
@Pure protected StandardRoadConnection.Connection getConnectionInfo(int index) throws ArrayIndexOutOfBoundsException
Replies all the information about a connection to a segment.- Parameters:
index
- the index.- Returns:
- all the information about a connection to a segment.
- Throws:
ArrayIndexOutOfBoundsException
- in case of error.
-
getConnectedSegments
@Pure public Iterable<RoadSegment> getConnectedSegments()
Description copied from interface:GraphPoint
Replies the list of segments connected to this point.- Specified by:
getConnectedSegments
in interfaceGraphPoint<RoadConnection,RoadSegment>
- Specified by:
getConnectedSegments
in interfaceRoadConnection
- Returns:
- the list of segments connected to this point.
-
getConnections
@Pure public Iterable<? extends GraphPoint.GraphPointConnection<RoadConnection,RoadSegment>> getConnections()
Description copied from interface:GraphPoint
Replies the list of segment connections for this point.- Specified by:
getConnections
in interfaceGraphPoint<RoadConnection,RoadSegment>
- Returns:
- the list of segments connected to this point.
-
getConnectedSegmentsStartingFrom
@Pure public Iterable<RoadSegment> getConnectedSegmentsStartingFrom(RoadSegment startingSegment)
Description copied from interface:GraphPoint
Replies 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:
getConnectedSegmentsStartingFrom
in interfaceGraphPoint<RoadConnection,RoadSegment>
- Specified by:
getConnectedSegmentsStartingFrom
in interfaceRoadConnection
- Parameters:
startingSegment
- the startint point.- Returns:
- the list of segments connected to this point.
-
getConnectedSegmentsStartingFromInReverseOrder
public Iterable<RoadSegment> getConnectedSegmentsStartingFromInReverseOrder(RoadSegment startingPoint)
Description copied from interface:GraphPoint
Replies 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:
getConnectedSegmentsStartingFromInReverseOrder
in interfaceGraphPoint<RoadConnection,RoadSegment>
- Parameters:
startingPoint
- the startint segment.- Returns:
- the list of segments connected to this point.
-
getConnectionsStartingFrom
@Pure public Iterable<? extends GraphPoint.GraphPointConnection<RoadConnection,RoadSegment>> getConnectionsStartingFrom(RoadSegment startingSegment)
Description copied from interface:GraphPoint
Replies 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:
getConnectionsStartingFrom
in interfaceGraphPoint<RoadConnection,RoadSegment>
- Parameters:
startingSegment
- the starting point.- Returns:
- the list of segments connected to this point.
-
getConnectionsStartingFromInReverseOrder
@Pure public Iterable<? extends GraphPoint.GraphPointConnection<RoadConnection,RoadSegment>> getConnectionsStartingFromInReverseOrder(RoadSegment startingSegment)
Description copied from interface:GraphPoint
Replies 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:
getConnectionsStartingFromInReverseOrder
in interfaceGraphPoint<RoadConnection,RoadSegment>
- Parameters:
startingSegment
- the starting point.- Returns:
- the list of segments connected to this point.
-
isConnectedSegment
@Pure public boolean isConnectedSegment(RoadSegment segment)
Description copied from interface:GraphPoint
Replies if the specified segment was connected to this point.- Specified by:
isConnectedSegment
in interfaceGraphPoint<RoadConnection,RoadSegment>
- Specified by:
isConnectedSegment
in interfaceRoadConnection
- Parameters:
segment
- the starting point.- Returns:
true
if the given segment is connected to this node, otherwisefalse
-
isFinalConnectionPoint
@Pure public boolean isFinalConnectionPoint()
Description copied from interface:RoadConnection
Replies 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 true
true
true n false n/a false
false
true 1 true 1 true
true
true n true 1 true
false
true n true m<=n false
false
- Specified by:
isFinalConnectionPoint
in interfaceGraphPoint<RoadConnection,RoadSegment>
- Specified by:
isFinalConnectionPoint
in interfaceRoadConnection
- Returns:
true
if zero or one segment was connected to this point, otherwisefalse
- See Also:
RoadConnection.isReallyCulDeSac()
-
isReallyCulDeSac
@Pure public boolean isReallyCulDeSac()
Description copied from interface:RoadConnection
Replies if this point is a cul-de-sac.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 true
true
true n false n/a false
false
true 1 true 1 true
true
true n true 1 true
false
true n true m<=n false
false
- Specified by:
isReallyCulDeSac
in interfaceRoadConnection
- Returns:
true
if zero or one segment was connected to this point, otherwisefalse
- See Also:
RoadConnection.isFinalConnectionPoint()
-
isEmpty
@Pure public boolean isEmpty()
Description copied from interface:RoadConnection
Replies if this connection has no connected segment.- Specified by:
isEmpty
in interfaceRoadConnection
- Returns:
true
if this object has no connected segment, otherwisefalse
-
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 repliesnull
.- Specified by:
getOtherSideSegment
in interfaceRoadConnection
- 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 final Iterator<RoadSegment> toCounterclockwiseIterator(RoadSegment startSegment, Boolean startConnection, RoadSegment endSegment, Boolean endConnection, 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 interfaceRoadConnection
- Parameters:
startSegment
- is the first segment to iterate.startConnection
- indicates if the start segment is connected by its first point.endSegment
- is the last segment to iterate.endConnection
- 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, Boolean startConnection, RoadSegment endSegment, Boolean endConnection, 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 interfaceRoadConnection
- Parameters:
startSegment
- is the first segment to iterate.startConnection
- indicates if the start segment is connected by its first point.endSegment
- is the last segment to iterate.endConnection
- 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, 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 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: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 thedefault clockwhise type
.This function assumes a
CoordinateSystemConstants.GIS_2D
- Specified by:
toCounterclockwiseIterator
in 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: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 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)
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 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: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 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: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 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: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 thedefault clockwhise type
.- Specified by:
toCounterclockwiseIterator
in 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: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 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, 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 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: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 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.
-
toClockwiseIterator
@Pure public final Iterator<RoadSegment> toClockwiseIterator(RoadSegment startSegment, Boolean startConnection, RoadSegment endSegment, Boolean endConnection, 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 interfaceRoadConnection
- Parameters:
startSegment
- is the first segment to iterate.startConnection
- indicates if the start segment is connected by its first point.endSegment
- is the last segment to iterate.endConnection
- 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, 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 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: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 thedefault clockwhise type
.This function assumes a
CoordinateSystemConstants.GIS_2D
- Specified by:
toClockwiseIterator
in 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: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 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)
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 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: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 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 Iterator<RoadSegment> toClockwiseIterator(RoadSegment startSegment, Boolean startConnection, RoadSegment endSegment, Boolean endConnection, 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 interfaceRoadConnection
- Parameters:
startSegment
- is the first segment to iterate.startConnection
- indicates if the start segment is connected by its first point.endSegment
- is the last segment to iterate.endConnection
- 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, 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 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: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 thedefault clockwhise type
.- Specified by:
toClockwiseIterator
in 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: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 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, 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 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: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 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.
-
addListeningIterator
protected void addListeningIterator(StandardRoadConnection.IClockwiseIterator iterator)
Add a listening iterator.- Parameters:
iterator
- the iterator.
-
removeListeningIterator
protected void removeListeningIterator(StandardRoadConnection.IClockwiseIterator iterator)
Remove a listening iterator.- Parameters:
iterator
- the iterator.
-
fireIteratorUpdate
protected void fireIteratorUpdate()
Notify the iterators about changes.
-
-