MATSIM
core
router
LinkWrapperFacilityWithSpecificCoord.java
Go to the documentation of this file.
1
2
/* *********************************************************************** *
3
* project: org.matsim.*
4
* LinkWrapperFacility.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
java.util.Map;
25
import
org
.
matsim
.
api
.
core
.
v01
.
Coord
;
26
import
org
.
matsim
.
api
.
core
.
v01
.
Id
;
27
import
org
.
matsim
.
api
.
core
.
v01
.
Identifiable
;
28
import
org
.
matsim
.
api
.
core
.
v01
.
network
.
Link
;
29
import
org
.
matsim
.
facilities
.
ActivityFacility
;
30
import
org
.
matsim
.
facilities
.
Facility
;
31
32
/*
33
* Wraps a Link into a Facility with a specific coordinate.
34
* Useful for, e.g., Access and egress leg distance calculations
35
*/
36
public
final
class
LinkWrapperFacilityWithSpecificCoord
implements
Facility
,
Identifiable
<ActivityFacility> {
37
38
private
final
Link
wrappedLink
;
39
private
final
Coord
wrappedCoord
;
40
41
public
LinkWrapperFacilityWithSpecificCoord
(
final
Link
linkToWrap,
final
Coord
coordToWrap) {
42
wrappedLink = linkToWrap;
43
wrappedCoord = coordToWrap;
44
}
45
46
@Override
47
public
Coord
getCoord
() {
48
return
wrappedCoord
;
49
}
50
51
@Override
52
public
Id<ActivityFacility>
getId
() {
53
throw
new
UnsupportedOperationException();
54
}
55
56
@Override
57
public
Map<String, Object>
getCustomAttributes
() {
58
throw
new
UnsupportedOperationException();
59
}
60
61
@Override
62
public
Id<Link>
getLinkId
() {
63
return
wrappedLink.
getId
();
64
}
65
66
@Override
67
public
String
toString
() {
68
return
"[LinkWrapperFacilityWithSpecificCoord: wrappedLink="
+ wrappedLink +
", wrapped Coord: "
+wrappedCoord+
"]"
;
69
}
70
}
org.matsim.facilities.ActivityFacility
Definition:
ActivityFacility.java:28
org.matsim.api.core.v01.network
Definition:
Link.java:20
org.matsim.api.core.v01.Id
Definition:
Id.java:44
org.matsim.core.router.LinkWrapperFacilityWithSpecificCoord.wrappedLink
final Link wrappedLink
Definition:
LinkWrapperFacilityWithSpecificCoord.java:38
org.matsim.api.core.v01.Identifiable.getId
Id< T > getId()
org.matsim.core.router.LinkWrapperFacilityWithSpecificCoord.getCustomAttributes
Map< String, Object > getCustomAttributes()
Definition:
LinkWrapperFacilityWithSpecificCoord.java:57
org.matsim.facilities
Definition:
ActivityFacilities.java:20
org
org.matsim.core.router.LinkWrapperFacilityWithSpecificCoord.getId
Id< ActivityFacility > getId()
Definition:
LinkWrapperFacilityWithSpecificCoord.java:52
org.matsim.core.router.LinkWrapperFacilityWithSpecificCoord.wrappedCoord
final Coord wrappedCoord
Definition:
LinkWrapperFacilityWithSpecificCoord.java:39
org.matsim.api.core.v01.Identifiable
Definition:
Identifiable.java:23
org.matsim.api
org.matsim.core.router.LinkWrapperFacilityWithSpecificCoord.LinkWrapperFacilityWithSpecificCoord
LinkWrapperFacilityWithSpecificCoord(final Link linkToWrap, final Coord coordToWrap)
Definition:
LinkWrapperFacilityWithSpecificCoord.java:41
org.matsim.api.core.v01.Coord
Definition:
Coord.java:35
org.matsim.facilities.Facility
Definition:
Facility.java:32
org.matsim.api.core
org.matsim.core.router.LinkWrapperFacilityWithSpecificCoord
Definition:
LinkWrapperFacilityWithSpecificCoord.java:36
org.matsim.core.router.LinkWrapperFacilityWithSpecificCoord.getLinkId
Id< Link > getLinkId()
Definition:
LinkWrapperFacilityWithSpecificCoord.java:62
org.matsim.core.router.LinkWrapperFacilityWithSpecificCoord.toString
String toString()
Definition:
LinkWrapperFacilityWithSpecificCoord.java:67
org.matsim
org.matsim.api.core.v01.network.Link
Definition:
Link.java:34
org.matsim.api.core.v01
Definition:
BasicLocation.java:20
org.matsim.core.router.LinkWrapperFacilityWithSpecificCoord.getCoord
Coord getCoord()
Definition:
LinkWrapperFacilityWithSpecificCoord.java:47
Generated by
1.8.13