Added proper .equals and hashCode methods for Keyframes

This commit is contained in:
CrushedPixel
2015-05-01 15:45:36 +02:00
parent 6f8a43aa6c
commit 2cccbe424a
4 changed files with 69 additions and 0 deletions

View File

@@ -11,4 +11,17 @@ public class Keyframe {
public int getRealTimestamp() {
return realTimestamp;
}
@Override
public boolean equals(Object o2) {
if(o2 == null) return false;
if(!(o2 instanceof Keyframe)) return false;
Keyframe kf = (Keyframe)o2;
return hashCode() == kf.hashCode();
}
@Override
public int hashCode() {
return realTimestamp;
}
}