Class TransitNetwork.Builder
java.lang.Object
rgu.transport.geospatial.multimodal.TransitNetwork.Builder
- Enclosing class:
TransitNetwork
Builder class, instance is obtained from
TransitNetwork.builder().- Author:
- Lee A. Christie
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddArtificialEdge(GeoLocation a, GeoLocation b, Duration duration) addLocation(GeoLocation location) Add the specified location.addRoad(GeoLocation from, GeoLocation to) Adds the specified road edge.addRoadGraph(Graph<GeoLocation, ?> graph, ProgressListener progress) addTransit(GeoLocation from, GeoLocation to, LocalTime departureTime, LocalTime arrivalTime) build()voidsetCarSpeed(Speed carSpeed) Sets the driving speed.voidsetWalkSpeed(Speed walkSpeed) Sets the walking speed.transitNeighbours(GeoLocation location) Returns the neighbours reachable by transit.
-
Method Details
-
setCarSpeed
Sets the driving speed.- Parameters:
carSpeed- the driving speed, not null
-
setWalkSpeed
Sets the walking speed.- Parameters:
walkSpeed- the walking speed, not null
-
addLocation
Add the specified location.- Parameters:
location- the location, not null- Returns:
- this object
- Throws:
IllegalStateException- if the location is a duplicate and the suppressDuplicates flag is not set
-
addRoad
Adds the specified road edge.- Parameters:
from- the start point, not nullto- the end point, not null- Returns:
- this object
- Throws:
IllegalStateException- if the edge is a duplicate and the suppressDuplicates flag is not set
-
addTransit
public TransitNetwork.Builder addTransit(GeoLocation from, GeoLocation to, LocalTime departureTime, LocalTime arrivalTime) -
build
-
locations
-
transitNeighbours
Returns the neighbours reachable by transit.- Parameters:
location- the location- Returns:
- the available trips to neighbours
-
addRoadGraph
public TransitNetwork.Builder addRoadGraph(Graph<GeoLocation, ?> graph, ProgressListener progress) throws InterruptedException - Throws:
InterruptedException
-
addArtificialEdge
-