MATSIM
FacilityWrapperActivity.java
Go to the documentation of this file.
1 
2 /* *********************************************************************** *
3  * project: org.matsim.*
4  * FacilityWrapperActivity.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;
32 
33 public class FacilityWrapperActivity implements Activity {
34  private final Facility wrapped;
35 
36  public FacilityWrapperActivity(final Facility toWrap) {
37  this.wrapped = toWrap;
38  }
39 
40  @Override
42  throw new UnsupportedOperationException( "only facility fields access are supported" );
43  }
44 
45  @Override
46  public void setEndTime(double seconds) {
47  throw new UnsupportedOperationException( "only facility fields access are supported" );
48  }
49 
50  @Override
51  public void setEndTimeUndefined() {
52  throw new UnsupportedOperationException( "only facility fields access are supported" );
53  }
54 
55  @Override
56  public String getType() {
57  throw new UnsupportedOperationException( "only facility fields access are supported" );
58  }
59 
60  @Override
61  public void setType(String type) {
62  throw new UnsupportedOperationException( "only facility fields access are supported" );
63  }
64 
65  @Override
66  public Coord getCoord() {
67  return wrapped.getCoord();
68  }
69 
70  @Override
72  throw new UnsupportedOperationException( "only facility fields access are supported" );
73  }
74 
75  @Override
76  public void setStartTime(double seconds) {
77  throw new UnsupportedOperationException( "only facility fields access are supported" );
78  }
79 
80  @Override
81  public void setStartTimeUndefined() {
82  throw new UnsupportedOperationException( "only facility fields access are supported" );
83  }
84 
85  @Override
87  throw new UnsupportedOperationException( "only facility fields access are supported" );
88  }
89 
90  @Override
91  public void setMaximumDuration(double seconds) {
92  throw new UnsupportedOperationException( "only facility fields access are supported" );
93  }
94 
95  @Override
97  throw new UnsupportedOperationException( "only facility fields access are supported" );
98  }
99 
100  @Override
101  public Id<Link> getLinkId() {
102  return wrapped.getLinkId();
103  }
104 
105  @Override
107  throw new UnsupportedOperationException( "only facility fields access are supported" );
108  }
109 
110  @Override
111  public String toString() {
112  return "[FacilityWrapper: wrapped="+wrapped+"]";
113  }
114 
115  @Override
116  public void setLinkId(Id<Link> id) {
117  throw new RuntimeException("not implemented") ;
118  }
119 
120  @Override
122  throw new RuntimeException("not implemented") ;
123  }
124 
125  @Override
126  public void setCoord(Coord coord) {
127  throw new RuntimeException("not implemented") ;
128  }
129 
130  @Override
132  throw new UnsupportedOperationException();
133  }
134 }