package shared.dataInput; import shared.model.Boat; import shared.model.Mark; import java.util.HashMap; import java.util.Map; /** * An empty {@link BoatDataSource}. Can be used to initialise a race with no data. */ public class EmptyBoatDataSource implements BoatDataSource { /** * A map of source ID to boat for all boats in the race. */ private final Map boatMap = new HashMap<>(); /** * A map of source ID to mark for all marks in the race. */ private final Map markerMap = new HashMap<>(); public EmptyBoatDataSource() { } /** * Get the boats that are going to participate in this race * @return Dictionary of boats that are to participate in this race indexed by SourceID */ @Override public Map getBoats() { return boatMap; } /** * Get the marker Boats that are participating in this race * @return Dictionary of the Markers Boats that are in this race indexed by their Source ID. */ @Override public Map getMarkerBoats() { return markerMap; } }