mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-09 13:50:57 +00:00
46 lines
1.7 KiB
Java
Executable File
46 lines
1.7 KiB
Java
Executable File
package com.sap.sailing.domain.base;
|
|
|
|
import java.util.UUID;
|
|
|
|
import com.sap.sailing.domain.common.Named;
|
|
import com.sap.sailing.domain.common.Renamable;
|
|
import com.sap.sailing.domain.common.WithID;
|
|
import com.sap.sailing.domain.leaderboard.LeaderboardGroup;
|
|
|
|
/**
|
|
* An event is a group of {@link Regatta regattas} carried out at a common venue within a common time frame. For
|
|
* example, Kiel Week 2011 is an event, and the International German Championship 2011 held, e.g., in Travem�nde, is an event,
|
|
* too.
|
|
*
|
|
* @author Axel Uhl (D043530)
|
|
*
|
|
*/
|
|
public interface Event extends Named, Renamable, WithID, EventBase {
|
|
Iterable<Regatta> getRegattas();
|
|
|
|
void addRegatta(Regatta regatta);
|
|
|
|
void removeRegatta(Regatta regatta);
|
|
|
|
/**
|
|
* For events, the ID is always a UUID.
|
|
*/
|
|
UUID getId();
|
|
|
|
/**
|
|
* Returns the live but unmodifiable collection of leaderboard groups that were previously
|
|
* {@link #addLeaderboardGroup(LeaderboardGroup) added} to this event, in the order of their addition. Therefore, to
|
|
* change the iteration order, {@link #removeLeaderboardGroup(LeaderboardGroup)} and
|
|
* {@link #addLeaderboardGroup(LeaderboardGroup)} need to be used.
|
|
*/
|
|
Iterable<LeaderboardGroup> getLeaderboardGroups();
|
|
|
|
void addLeaderboardGroup(LeaderboardGroup leaderboardGroup);
|
|
|
|
/**
|
|
* @return <code>true</code> if and only if a leaderboard group equal to <code>leaderboardGroup</code> was part of
|
|
* {@link #getLeaderboardGroups()} and therefore was actually removed
|
|
*/
|
|
boolean removeLeaderboardGroup(LeaderboardGroup leaderboardGroup);
|
|
}
|