diff --git a/src/main/java/telraam/logic/external/ExternalLapper.java b/src/main/java/telraam/logic/external/ExternalLapper.java index d2e7e34..3aee9f2 100644 --- a/src/main/java/telraam/logic/external/ExternalLapper.java +++ b/src/main/java/telraam/logic/external/ExternalLapper.java @@ -46,8 +46,8 @@ public void saveLaps(List teamLaps) { // Find which laps are no longer needed or have to be added for (ExternalLapperTeamLaps teamLap : teamLaps) { - List lapsForTeam = laps.stream().filter(l -> l.getTeamId() == teamLap.teamId).sorted(Comparator.comparing(Lap::getTimestamp)).toList(); - List newLapsForTeam = teamLap.laps.stream().map(nl -> new Lap(teamLap.teamId, lapSourceId, new Timestamp((long) (nl.timestamp)))).sorted(Comparator.comparing(Lap::getTimestamp)).toList(); + List lapsForTeam = laps.stream().filter(l -> l.getTeamId() == teamLap.getTeamId()).sorted(Comparator.comparing(Lap::getTimestamp)).toList(); + List newLapsForTeam = teamLap.getLaps().stream().map(nl -> new Lap(teamLap.getTeamId(), lapSourceId, new Timestamp((long) (nl.getTimestamp())))).sorted(Comparator.comparing(Lap::getTimestamp)).toList(); int lapsIndex = 0; int newLapsIndex = 0; diff --git a/src/main/java/telraam/logic/external/models/ExternalLapperLap.java b/src/main/java/telraam/logic/external/models/ExternalLapperLap.java index 724ec5f..f343ce1 100644 --- a/src/main/java/telraam/logic/external/models/ExternalLapperLap.java +++ b/src/main/java/telraam/logic/external/models/ExternalLapperLap.java @@ -1,5 +1,9 @@ package telraam.logic.external.models; +import lombok.Getter; +import lombok.Setter; + +@Getter @Setter public class ExternalLapperLap { - public double timestamp; + private double timestamp; } diff --git a/src/main/java/telraam/logic/external/models/ExternalLapperStats.java b/src/main/java/telraam/logic/external/models/ExternalLapperStats.java index 74598d3..cc31a04 100644 --- a/src/main/java/telraam/logic/external/models/ExternalLapperStats.java +++ b/src/main/java/telraam/logic/external/models/ExternalLapperStats.java @@ -1,33 +1,13 @@ package telraam.logic.external.models; +import lombok.Getter; +import lombok.Setter; + import java.util.List; +@Setter @Getter public class ExternalLapperStats { private List errorHistory; private List> transitionMatrix; private List> emissionMatrix; - - public List getErrorHistory() { - return errorHistory; - } - - public void setErrorHistory(List errorHistory) { - this.errorHistory = errorHistory; - } - - public List> getTransitionMatrix() { - return transitionMatrix; - } - - public void setTransitionMatrix(List> transitionMatrix) { - this.transitionMatrix = transitionMatrix; - } - - public List> getEmissionMatrix() { - return emissionMatrix; - } - - public void setEmissionMatrix(List> emissionMatrix) { - this.emissionMatrix = emissionMatrix; - } } diff --git a/src/main/java/telraam/logic/external/models/ExternalLapperTeamLaps.java b/src/main/java/telraam/logic/external/models/ExternalLapperTeamLaps.java index c184222..c8e8170 100644 --- a/src/main/java/telraam/logic/external/models/ExternalLapperTeamLaps.java +++ b/src/main/java/telraam/logic/external/models/ExternalLapperTeamLaps.java @@ -1,8 +1,13 @@ package telraam.logic.external.models; +import lombok.Getter; +import lombok.Setter; + import java.util.List; + +@Getter @Setter public class ExternalLapperTeamLaps { - public int teamId; - public List laps; + private int teamId; + private List laps; }