Class Competition
java.lang.Object
org.episteme.social.sports.Competition
- All Implemented Interfaces:
Serializable
Represents a sports competition, such as a tournament, league, or championship.
Aggregates matches and manages prize distribution.
* @version 1.1
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a match to the competition registry.voidRegisters a prize for winners or participants.Returns an unmodifiable view of all matches in this competition.getName()Returns an unmodifiable list of prizes.voidsetDescription(String description) toString()
-
Constructor Details
-
Competition
Initializes a new Competition.- Parameters:
name- the name (e.g., "World Cup 2026")- Throws:
NullPointerException- if name is null
-
-
Method Details
-
getName
-
addMatch
Adds a match to the competition registry.- Parameters:
match- the match to add
-
getMatches
-
addPrize
Registers a prize for winners or participants. -
getPrizes
-
getDescription
-
setDescription
-
toString
-