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 booleanaddToPath(RoadPath path, RoadSegment segment)Add the given segment into the given path.RoadPathnewPath(RoadConnection startPoint, RoadSegment segment)Create an empty path.
-
-
-
Method Detail
-
newPath
@Pure public RoadPath newPath(RoadConnection startPoint, RoadSegment segment)
Description copied from interface:AStarPathFactoryCreate an empty path.- Specified by:
newPathin 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:AStarPathFactoryAdd the given segment into the given path.- Specified by:
addToPathin interfaceAStarPathFactory<RoadPath,RoadSegment,RoadConnection>- Parameters:
path- is the path to build.segment- is the segment to add.- Returns:
trueif the segment was added; otherwisefalse.
-
-