MATSIM
TransitStopFacilityImpl.java
Go to the documentation of this file.
1 /* *********************************************************************** *
2  * project: org.matsim.*
3  * TransitStopFacility.java
4  * *
5  * *********************************************************************** *
6  * *
7  * copyright : (C) 2009 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 
21 package org.matsim.pt.transitSchedule;
22 
23 import java.util.Map;
24 
25 import org.matsim.api.core.v01.Coord;
27 import org.matsim.api.core.v01.Id;
34 
41 
42  private final Id<TransitStopFacility> id;
44  private Coord coord;
45  private Id<Link> linkId = null;
46  private final boolean isBlockingLane;
47  private String name = null;
49  private final Attributes attributes = new AttributesImpl();
50 
51  protected TransitStopFacilityImpl(final Id<TransitStopFacility> id, final Coord coord, final boolean isBlockingLane) {
52  this.id = id;
53  this.coord = coord;
54  this.isBlockingLane = isBlockingLane;
55  }
56 
57  @Override
58  public void setLinkId(final Id<Link> linkId) {
59  this.linkId = linkId;
60  }
61 
62  @Override
63  public Id<Link> getLinkId() {
64  return this.linkId;
65  }
66 
67  @Override
68  public Coord getCoord() {
69  return this.coord;
70  }
71 
72  @Override
73  public void setCoord(Coord coord) {
74  this.coord = coord;
75  }
76 
77  @Override
79  return this.id;
80  }
81 
82  @Override
83  public boolean getIsBlockingLane() {
84  return this.isBlockingLane;
85  }
86 
87  @Override
88  public void setName(final String name) {
89  this.name = name;
90  }
91 
92  @Override
93  public String getName() {
94  return this.name;
95  }
96 
97  @Override
98  public String toString() {
99  StringBuilder strb = new StringBuilder( ) ;
100  strb.append( "[ facility id=" ).append( id ) ;
101  strb.append ( " | coord=").append( coord ) ;
102  strb.append( " | linkId=" ).append( linkId ) ;
103 
104  strb.append(" ] ") ;
105  return strb.toString() ;
106  }
107 
108  @Override
110  return this.stopAreaId;
111  }
112 
113  @Override
114  public void setStopAreaId(Id<TransitStopArea> stopAreaId) {
115  this.stopAreaId = stopAreaId;
116  }
117 
118  @Override
119  public Map<String, Object> getCustomAttributes() {
120  if (this.customizableDelegate == null) {
121  this.customizableDelegate = CustomizableUtils.createCustomizable();
122  }
123  return this.customizableDelegate.getCustomAttributes();
124  }
125 
126  @Override
128  return this.attributes;
129  }
130 }
Map< String, Object > getCustomAttributes()
TransitStopFacilityImpl(final Id< TransitStopFacility > id, final Coord coord, final boolean isBlockingLane)