Cleanup: SegmentStatisticUpdater and Track do not need equal().

This commit is contained in:
Dennis Guse
2025-10-28 21:53:21 +01:00
parent bc62320b9f
commit c227d54f26
2 changed files with 0 additions and 26 deletions
@@ -26,7 +26,6 @@ import androidx.annotation.VisibleForTesting;
import java.time.OffsetDateTime;
import java.time.ZoneOffset;
import java.util.Objects;
import java.util.UUID;
import de.dennisguse.opentracks.stats.SegmentStatisticUpdater;
@@ -169,22 +168,6 @@ public class Track {
'}';
}
@Deprecated //TODO Remove: should not be used.
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Track track = (Track) o;
return id.equals(track.id);
}
@Deprecated //TODO Remove: should not be used.
@Override
public int hashCode() {
return Objects.hash(id);
}
public record Id(long id) implements Parcelable {
@Override
@@ -411,15 +411,6 @@ public class SegmentStatisticUpdater {
totalAltitudeLoss_m += loss_m;
}
@Deprecated //TODO Remove as it should (a) not be necessary and (b) toString is not complete?
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof SegmentStatisticUpdater)) return false;
return toString().equals(o.toString());
}
@NonNull
@Override
public String toString() {