MATSIM
Transit.java
Go to the documentation of this file.
1 
2 /* *********************************************************************** *
3  * project: org.matsim.*
4  * Transit.java
5  * *
6  * *********************************************************************** *
7  * *
8  * copyright : (C) 2019 by the members listed in the COPYING, *
9  * LICENSE and WARRANTY file. *
10  * email : info at matsim dot org *
11  * *
12  * *********************************************************************** *
13  * *
14  * This program is free software; you can redistribute it and/or modify *
15  * it under the terms of the GNU General Public License as published by *
16  * the Free Software Foundation; either version 2 of the License, or *
17  * (at your option) any later version. *
18  * See also COPYING, LICENSE and WARRANTY file *
19  * *
20  * *********************************************************************** */
21 
22  package org.matsim.core.router;
23 
24 import com.google.inject.name.Named;
25 import org.matsim.api.core.v01.Scenario;
28 
29 import jakarta.inject.Inject;
30 import jakarta.inject.Provider;
31 
32 public class Transit implements Provider<RoutingModule> {
33 
35 
36  private final Scenario scenario;
37 
39 
40  @Inject
41  Transit(TransitRouter transitRouter, Scenario scenario, @Named(TransportMode.walk) RoutingModule transitWalkRouter) {
42  this.transitRouter = transitRouter;
43  this.scenario = scenario;
44  this.transitWalkRouter = transitWalkRouter;
45  }
46 
47  @Override
48  public RoutingModule get() {
49  return new TransitRouterWrapper(transitRouter,
50  scenario.getTransitSchedule(),
51  scenario.getNetwork(),
53  }
54 }
final RoutingModule transitWalkRouter
Definition: Transit.java:38
final TransitRouter transitRouter
Definition: Transit.java:34
TransitSchedule getTransitSchedule()