Introduced Statistics as a value object.

This commit is contained in:
Dennis Guse
2025-10-26 20:23:39 +01:00
parent fba08fe8dd
commit 920ad5129a
8 changed files with 105 additions and 29 deletions
@@ -78,9 +78,9 @@ public class TrackStatisticsUpdater {
stats.merge(currentSegment);
return stats;
}
public SegmentStatisticUpdater getCurrentSegment() {
// Take a snapshot - we don't want anyone messing with our currentSegment
return new SegmentStatisticUpdater(currentSegment);
public Statistics getCurrentSegment() {
return currentSegment.getStatistics();
}
public void addTrackPoints(List<TrackPoint> trackPoints) {