MATSIM
pt
router
RouteSegment.java
Go to the documentation of this file.
1
/* *********************************************************************** *
2
* project: org.matsim.*
3
* *
4
* *********************************************************************** *
5
* *
6
* copyright : (C) 2015 by the members listed in the COPYING, *
7
* LICENSE and WARRANTY file. *
8
* email : info at matsim dot org *
9
* *
10
* *********************************************************************** *
11
* *
12
* This program is free software; you can redistribute it and/or modify *
13
* it under the terms of the GNU General Public License as published by *
14
* the Free Software Foundation; either version 2 of the License, or *
15
* (at your option) any later version. *
16
* See also COPYING, LICENSE and WARRANTY file *
17
* *
18
* *********************************************************************** */
19
20
package
org.matsim.pt.router;
21
22
import
org
.
matsim
.
api
.
core
.
v01
.
Id
;
23
import
org
.
matsim
.
pt
.
transitSchedule
.
api
.
TransitLine
;
24
import
org
.
matsim
.
pt
.
transitSchedule
.
api
.
TransitRoute
;
25
import
org
.
matsim
.
pt
.
transitSchedule
.
api
.
TransitStopFacility
;
26
32
public
class
RouteSegment
{
33
34
final
TransitStopFacility
fromStop;
35
final
TransitStopFacility
toStop;
36
final
double
travelTime;
37
final
Id<TransitLine>
lineTaken;
38
final
Id<TransitRoute>
routeTaken;
39
40
public
RouteSegment
(
TransitStopFacility
fromStop,
TransitStopFacility
toStop,
double
travelTime,
Id<TransitLine>
lineTaken,
Id<TransitRoute>
routeTaken) {
41
this.fromStop = fromStop;
42
this.toStop = toStop;
43
this.travelTime = travelTime;
44
this.lineTaken = lineTaken;
45
this.routeTaken = routeTaken;
46
}
47
48
@Override
49
public
String
toString
() {
50
return
"From: "
+ fromStop.
getId
() +
" to "
+ toStop.
getId
() +
" in "
+ travelTime +
"s via "
+ routeTaken;
51
}
52
53
public
double
getTravelTime
() {
54
return
travelTime;
55
}
56
57
public
TransitStopFacility
getFromStop
() {
58
return
fromStop;
59
}
60
61
public
TransitStopFacility
getToStop
() {
62
return
toStop;
63
}
64
65
public
Id<TransitLine>
getLineTaken
() {
66
return
lineTaken;
67
}
68
69
public
Id<TransitRoute>
getRouteTaken
() {
70
return
routeTaken;
71
}
72
}
73
org.matsim.pt.transitSchedule.api
Definition:
Departure.java:21
org.matsim.api.core.v01.Id
Definition:
Id.java:44
org.matsim.pt.router.RouteSegment.getTravelTime
double getTravelTime()
Definition:
RouteSegment.java:53
org.matsim.pt.router.RouteSegment.getFromStop
TransitStopFacility getFromStop()
Definition:
RouteSegment.java:57
org.matsim.pt
org.matsim.api.core.v01.Identifiable.getId
Id< T > getId()
org
org.matsim.pt.transitSchedule.api.TransitStopFacility
Definition:
TransitStopFacility.java:35
org.matsim.pt.router.RouteSegment.getRouteTaken
Id< TransitRoute > getRouteTaken()
Definition:
RouteSegment.java:69
org.matsim.api
org.matsim.pt.router.RouteSegment
Definition:
RouteSegment.java:32
org.matsim.api.core
org.matsim.pt.transitSchedule
org.matsim.pt.router.RouteSegment.getLineTaken
Id< TransitLine > getLineTaken()
Definition:
RouteSegment.java:65
org.matsim.pt.router.RouteSegment.toString
String toString()
Definition:
RouteSegment.java:49
org.matsim.pt.router.RouteSegment.getToStop
TransitStopFacility getToStop()
Definition:
RouteSegment.java:61
org.matsim.pt.transitSchedule.api.TransitLine
Definition:
TransitLine.java:34
org.matsim
org.matsim.api.core.v01
Definition:
BasicLocation.java:20
org.matsim.pt.router.RouteSegment.RouteSegment
RouteSegment(TransitStopFacility fromStop, TransitStopFacility toStop, double travelTime, Id< TransitLine > lineTaken, Id< TransitRoute > routeTaken)
Definition:
RouteSegment.java:40
org.matsim.pt.transitSchedule.api.TransitRoute
Definition:
TransitRoute.java:36
Generated by
1.8.13