MATSIM
BoardingDeniedEvent.java
Go to the documentation of this file.
1 /* *********************************************************************** *
2  * project: org.matsim.*
3  * *
4  * *********************************************************************** *
5  * *
6  * copyright : (C) 2012 by the members listed in the COPYING, *
7  * LICENSE and WARRANTY file. *
8  * email : info at matsim dot org *
9  * *
10  * *********************************************************************** *
11  * *
12  * This program is free software; you can redistribute it and/or modify *
13  * it under the terms of the GNU General Public License as published by *
14  * the Free Software Foundation; either version 2 of the License, or *
15  * (at your option) any later version. *
16  * See also COPYING, LICENSE and WARRANTY file *
17  * *
18  * *********************************************************************** */
19 
20 package org.matsim.core.api.experimental.events;
21 
22 import java.util.Map;
23 
24 import org.matsim.api.core.v01.Id;
28 import org.matsim.vehicles.Vehicle;
29 
30 
35 public final class BoardingDeniedEvent extends Event implements HasPersonId
36 {
37  public static final String EVENT_TYPE="BoardingDeniedEvent";
38 
39  public static final String ATTRIBUTE_PERSON_ID = "person";
40  public static final String ATTRIBUTE_VEHICLE_ID = "vehicle";
41 
44 
45  public BoardingDeniedEvent(final double time, Id<Person> personId, Id<Vehicle> vehicleId) {
46  super(time);
47  this.personId = personId;
48  this.vehicleId = vehicleId;
49  }
50 
52  return personId;
53  }
54 
56  return vehicleId;
57  }
58 
59  @Override
60  public Map<String,String> getAttributes() {
61  Map<String,String> atts = super.getAttributes();
62  atts.put(ATTRIBUTE_PERSON_ID, this.personId.toString());
63  atts.put(ATTRIBUTE_VEHICLE_ID, this.vehicleId.toString());
64  return atts;
65  }
66 
67  @Override
68  public String getEventType() {
69  return EVENT_TYPE;
70  }
71 }
BoardingDeniedEvent(final double time, Id< Person > personId, Id< Vehicle > vehicleId)