mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-27 06:17:27 +00:00
Added view model for regatta progress
This commit is contained in:
1 parent
af800938ae
commit
4a2abd031e
2 files changed
+56
No files matched your search
+18
@@ -0,0 +1,18 @@
|
||||
package com.sap.sailing.gwt.ui.shared.dispatch.regatta;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.sap.sailing.gwt.ui.shared.dispatch.DTO;
|
||||
|
||||
public class RegattaProgressDTO implements DTO {
|
||||
private ArrayList<RegattaProgressSeriesDTO> series = new ArrayList<>();
|
||||
|
||||
public void addSeries(RegattaProgressSeriesDTO regattaProgressOfSeries) {
|
||||
series.add(regattaProgressOfSeries);
|
||||
}
|
||||
|
||||
public List<RegattaProgressSeriesDTO> getSeries() {
|
||||
return series;
|
||||
}
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
package com.sap.sailing.gwt.ui.shared.dispatch.regatta;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import com.sap.sailing.gwt.ui.shared.dispatch.DTO;
|
||||
import com.sap.sailing.gwt.ui.shared.race.FleetMetadataDTO;
|
||||
|
||||
public class RegattaProgressSeriesDTO implements DTO {
|
||||
private String name;
|
||||
private int totalRaceCount;
|
||||
private TreeMap<FleetMetadataDTO, Integer> fleetState = new TreeMap<>();
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private RegattaProgressSeriesDTO() {
|
||||
}
|
||||
|
||||
public RegattaProgressSeriesDTO(String name, int totalRaceCount) {
|
||||
this.name = name;
|
||||
this.totalRaceCount = totalRaceCount;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public int getTotalRaceCount() {
|
||||
return totalRaceCount;
|
||||
}
|
||||
|
||||
public Map<FleetMetadataDTO, Integer> getFleetState() {
|
||||
return fleetState;
|
||||
}
|
||||
|
||||
public void addFleet(FleetMetadataDTO fleet, int raceCount) {
|
||||
fleetState.put(fleet, raceCount);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user