forked from upstream-mirrors/OpenTracks
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.OffsetDateTime;
|
||||||
import java.time.ZoneOffset;
|
import java.time.ZoneOffset;
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import de.dennisguse.opentracks.stats.SegmentStatisticUpdater;
|
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 {
|
public record Id(long id) implements Parcelable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -411,15 +411,6 @@ public class SegmentStatisticUpdater {
|
|||||||
totalAltitudeLoss_m += loss_m;
|
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
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
|||||||
Reference in New Issue
Block a user