MATSIM
core
router
LinkWrapperFacility.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
org
.
matsim
.
api
.
core
.
v01
.
Coord
;
25
import
org
.
matsim
.
api
.
core
.
v01
.
Id
;
26
import
org
.
matsim
.
api
.
core
.
v01
.
Identifiable
;
27
import
org
.
matsim
.
api
.
core
.
v01
.
network
.
Link
;
28
import
org
.
matsim
.
facilities
.
ActivityFacility
;
29
import
org
.
matsim
.
facilities
.
Facility
;
30
31
import
java.util.Map;
32
33
/*
34
* Wraps a Link into a Facility.
35
*/
36
public
final
class
LinkWrapperFacility
implements
Facility
,
Identifiable
<ActivityFacility> {
37
38
private
final
Link
wrapped
;
39
40
public
LinkWrapperFacility
(
final
Link
toWrap) {
41
wrapped = toWrap;
42
}
43
44
@Override
45
public
Coord
getCoord
() {
46
return
wrapped.
getCoord
();
47
}
48
49
@Override
50
public
Id<ActivityFacility>
getId
() {
51
throw
new
UnsupportedOperationException();
52
}
53
54
@Override
55
public
Map<String, Object>
getCustomAttributes
() {
56
throw
new
UnsupportedOperationException();
57
}
58
59
@Override
60
public
Id<Link>
getLinkId
() {
61
return
wrapped.
getId
();
62
}
63
64
@Override
65
public
String
toString
() {
66
return
"[LinkWrapperFacility: wrapped="
+wrapped+
"]"
;
67
}
68
}
org.matsim.core.router.LinkWrapperFacility.getId
Id< ActivityFacility > getId()
Definition:
LinkWrapperFacility.java:50
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.LinkWrapperFacility.wrapped
final Link wrapped
Definition:
LinkWrapperFacility.java:38
org.matsim.api.core.v01.Identifiable.getId
Id< T > getId()
org.matsim.core.router.LinkWrapperFacility.getCoord
Coord getCoord()
Definition:
LinkWrapperFacility.java:45
org.matsim.facilities
Definition:
ActivityFacilities.java:20
org.matsim.core.router.LinkWrapperFacility.getLinkId
Id< Link > getLinkId()
Definition:
LinkWrapperFacility.java:60
org
org.matsim.api.core.v01.Identifiable
Definition:
Identifiable.java:23
org.matsim.api
org.matsim.core.router.LinkWrapperFacility.getCustomAttributes
Map< String, Object > getCustomAttributes()
Definition:
LinkWrapperFacility.java:55
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.LinkWrapperFacility
Definition:
LinkWrapperFacility.java:36
org.matsim
org.matsim.api.core.v01.network.Link
Definition:
Link.java:34
org.matsim.api.core.v01.BasicLocation.getCoord
Coord getCoord()
org.matsim.api.core.v01
Definition:
BasicLocation.java:20
org.matsim.core.router.LinkWrapperFacility.LinkWrapperFacility
LinkWrapperFacility(final Link toWrap)
Definition:
LinkWrapperFacility.java:40
org.matsim.core.router.LinkWrapperFacility.toString
String toString()
Definition:
LinkWrapperFacility.java:65
Generated by
1.8.13