Module org.arakhne.afc.gis.gisroad
Class RoadAStarPathFactory
- java.lang.Object
-
- org.arakhne.afc.gis.road.path.astar.RoadAStarPathFactory
-
- All Implemented Interfaces:
AStarPathFactory<RoadPath,RoadSegment,RoadConnection>
public class RoadAStarPathFactory extends Object implements AStarPathFactory<RoadPath,RoadSegment,RoadConnection>
This class is the factory used to create a road path during the execution of the A* algorithm.- 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
-
-
Constructor Summary
Constructors Constructor Description RoadAStarPathFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addToPath(RoadPath path, RoadSegment segment)
Add the given segment into the given path.RoadPath
newPath(RoadConnection startPoint, RoadSegment segment)
Create an empty path.
-
-
-
Method Detail
-
newPath
@Pure public RoadPath newPath(RoadConnection startPoint, RoadSegment segment)
Description copied from interface:AStarPathFactory
Create an empty path.- Specified by:
newPath
in interfaceAStarPathFactory<RoadPath,RoadSegment,RoadConnection>
- Parameters:
startPoint
- is the first point in the path.segment
- is the first connection to follow.- Returns:
- the path instance.
-
addToPath
public boolean addToPath(RoadPath path, RoadSegment segment)
Description copied from interface:AStarPathFactory
Add the given segment into the given path.- Specified by:
addToPath
in interfaceAStarPathFactory<RoadPath,RoadSegment,RoadConnection>
- Parameters:
path
- is the path to build.segment
- is the segment to add.- Returns:
true
if the segment was added; otherwisefalse
.
-
-