Revert "Remove unused hashCode() because we use TreeMap"

This reverts commit 78db9bea.
parent 78db9bea
......@@ -15,6 +15,14 @@ public class PedestrianIdDataKey implements Comparable<PedestrianIdDataKey> {
return "pid";
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + pedestrianId;
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
......
......@@ -15,6 +15,14 @@ public class TimestepDataKey implements Comparable<TimestepDataKey> {
return "ts";
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + timestep;
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
......
......@@ -30,6 +30,15 @@ public class TimestepPedestrianIdDataKey implements Comparable<TimestepPedestria
return new String[] { TimestepDataKey.getHeader(), PedestrianIdDataKey.getHeader() };
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + pedestrianId;
result = prime * result + timestep;
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment