MATSIM
DepartureEvent.java
Go to the documentation of this file.
1 /* *********************************************************************** *
2  * project: org.matsim.*
3  * DepartureEvent.java
4  * *
5  * *********************************************************************** *
6  * *
7  * copyright : (C) 2007 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.core.trafficmonitoring;
22 
23 import org.matsim.api.core.v01.Id;
25 
26 /*package*/ class DepartureEvent {
27 
28  private final Id<Person> agentId;
29 
30  protected DepartureEvent(final Id<Person> agentId) {
31  this.agentId = agentId;
32  }
33 
34  @Override
35  public boolean equals(final Object arg0) {
36  if (!(arg0 instanceof DepartureEvent)) return false;
37 
38  DepartureEvent event = (DepartureEvent)arg0;
39  return (this.agentId.equals(event.agentId));
40  }
41 
42  @Override
43  public String toString() {
44  return "[[agentId = " + this.agentId + "]";
45  }
46 
47  @Override
48  public int hashCode() {
49  return this.agentId.hashCode();
50  }
51 
52 }