mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-02 09:33:06 +02:00
Cleanup: SegmentStatisticUpdater and Track do not need equal().
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user