Merge branch 'feature-calendarsync' of https://github.com/Freeyourgadget/Gadgetbridge into feature-calendarsync

master
Andreas Shimokawa 2017-04-17 21:11:17 +02:00
commit 087f5879b0
1 changed files with 14 additions and 1 deletions

View File

@ -156,7 +156,8 @@ public class CalendarEvents {
return calName;
}
@Override public boolean equals(Object other) {
@Override
public boolean equals(Object other) {
if (other instanceof CalendarEvent) {
CalendarEvent e = (CalendarEvent) other;
return (this.getId() == e.getId()) &&
@ -170,5 +171,17 @@ public class CalendarEvents {
return false;
}
}
@Override
public int hashCode() {
int result = (int) id;
result = 31 * result + title.hashCode();
result = 31 * result + Long.valueOf(begin).hashCode();
result = 31 * result + location.hashCode();
result = 31 * result + description.hashCode();
result = 31 * result + Long.valueOf(end).hashCode();
result = 31 * result + calName.hashCode();
return result;
}
}
}