Speed.ZERO as constant.

This commit is contained in:
Dennis Guse
2025-11-02 08:30:15 +01:00
parent a5e5d0ca51
commit fffeb40200
15 changed files with 42 additions and 45 deletions
@@ -56,7 +56,7 @@ public class AggregatorCyclingDistanceSpeed extends Aggregator<BluetoothHandlerC
@Override
protected void resetImmediate() {
aggregatedValue = new Data(Distance.of(0), aggregatedValue.distanceOverall, Speed.zero());
aggregatedValue = new Data(Distance.of(0), aggregatedValue.distanceOverall, Speed.ZERO);
}
@Override
@@ -69,7 +69,7 @@ public class AggregatorCyclingDistanceSpeed extends Aggregator<BluetoothHandlerC
@NonNull
@Override
protected Data getNoneValue() {
return new Data(Distance.of(0), Distance.of(0), Speed.zero());
return new Data(Distance.of(0), Distance.of(0), Speed.ZERO);
}
public void setWheelCircumference(Distance wheelCircumference) {
@@ -37,7 +37,7 @@ public final class AggregatorRunning extends Aggregator<BluetoothHandlerRunningS
@Override
protected void resetImmediate() {
aggregatedValue = new Data(Speed.zero(), Cadence.of(0f), aggregatedValue.distance);
aggregatedValue = new Data(Speed.ZERO, Cadence.of(0f), aggregatedValue.distance);
}
@Override
@@ -50,7 +50,7 @@ public final class AggregatorRunning extends Aggregator<BluetoothHandlerRunningS
@NonNull
@Override
protected Data getNoneValue() {
return new Data(Speed.zero(), Cadence.of(0f), Distance.of(0));
return new Data(Speed.ZERO, Cadence.of(0f), Distance.of(0));
}
public record Data(Speed speed, Cadence cadence, @NonNull Distance distance) {