mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-16 07:10:48 +00:00
Merge branch 'master' into bug2822_boatcolors
This commit is contained in:
commit
626a3eeb95
2 files changed
+21
-10
No files matched your search
+15
-4
@@ -3,6 +3,7 @@ package com.sap.sailing.domain.common.dto;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
@@ -45,13 +46,23 @@ public abstract class AbstractLeaderboardDTO implements Serializable {
|
||||
}
|
||||
|
||||
public Set<BoatClassDTO> getBoatClasses() {
|
||||
Set<BoatClassDTO> result = new HashSet<BoatClassDTO>();
|
||||
if(rows != null) {
|
||||
Set<BoatClassDTO> result = new HashSet<>();
|
||||
collectBoatClasses(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
private void collectBoatClasses(Collection<BoatClassDTO> boatClasses) {
|
||||
if (rows != null) {
|
||||
for (CompetitorDTO competitor : rows.keySet()) {
|
||||
result.add(competitor.getBoatClass());
|
||||
boatClasses.add(competitor.getBoatClass());
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public BoatClassDTO getDominantBoatClass() {
|
||||
List<BoatClassDTO> result = new ArrayList<>();
|
||||
collectBoatClasses(result);
|
||||
return Util.getDominantObject(result);
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
|
||||
+6
-6
@@ -122,16 +122,16 @@ public class TrackRaceBoatCompetitorMetadataReplicationTest extends AbstractServ
|
||||
@Test
|
||||
public void testStartTrackingRaceReplication() throws Exception {
|
||||
final String boat1CompetitorName = "CYC";
|
||||
final String boat1Name = "Boot 1";
|
||||
final String boat1Color = "#FF0000";
|
||||
final String boat1Name = "Boot 1";
|
||||
final String boat1Color = "#141414";
|
||||
|
||||
final String boat2CompetitorName = "SVI";
|
||||
final String boat2Name = "Boot 2";
|
||||
final String boat2Color = "#FFFF00";
|
||||
final String boat2Name = "Boot 2";
|
||||
final String boat2Color = "#606060";
|
||||
|
||||
final String boat3CompetitorName = "BYCÜ";
|
||||
final String boat3Name = "Boot 3";
|
||||
final String boat3Color = "#FF00FF";
|
||||
final String boat3Name = "Boot 3";
|
||||
final String boat3Color = "#0169EF";
|
||||
|
||||
startTracking();
|
||||
Thread.sleep(5000);
|
||||
|
||||
Reference in new issue
Block a user