MATSIM
ActivityWrapperFacility.java
Go to the documentation of this file.
1 /* *********************************************************************** *
2  * project: org.matsim.*
3  * ActivityWrapperFacility.java
4  * *
5  * *********************************************************************** *
6  * *
7  * copyright : (C) 2012 by the members listed in the COPYING, *
8  * LICENSE and WARRANTY file. *
9  * email : info at matsim dot org *
10  * *
11  * *********************************************************************** *
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * See also COPYING, LICENSE and WARRANTY file *
18  * *
19  * *********************************************************************** */
20 package org.matsim.facilities;
21 
22 import java.util.Map;
23 
24 import org.matsim.api.core.v01.Coord;
25 import org.matsim.api.core.v01.Id;
29 
36  class ActivityWrapperFacility implements Facility, Identifiable<ActivityFacility> {
37  private final Activity wrapped;
38 
39  ActivityWrapperFacility( final Activity toWrap ) {
40  this.wrapped = toWrap;
41  }
42 
43  @Override
44  public Coord getCoord() {
45  return this.wrapped.getCoord();
46  }
47 
48  @Override
49  public Id<ActivityFacility> getId() {
50  return this.wrapped.getFacilityId();
51  }
52 
53  @Override
54  public Map<String, Object> getCustomAttributes() {
55  throw new UnsupportedOperationException();
56  }
57 
58  @Override
59  public Id<Link> getLinkId() {
60  return this.wrapped.getLinkId();
61  }
62 
63  @Override
64  public String toString() {
65  return "[ActivityWrapperFacility: wrapped="+this.wrapped+"]";
66  }
67 }
68