Class Competition

java.lang.Object
org.episteme.social.sports.Competition
All Implemented Interfaces:
Serializable

public class Competition extends Object implements 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 Details

    • Competition

      public Competition(String name)
      Initializes a new Competition.
      Parameters:
      name - the name (e.g., "World Cup 2026")
      Throws:
      NullPointerException - if name is null
  • Method Details

    • getName

      public String getName()
    • addMatch

      public void addMatch(Match match)
      Adds a match to the competition registry.
      Parameters:
      match - the match to add
    • getMatches

      public List<Match> getMatches()
      Returns an unmodifiable view of all matches in this competition.
    • addPrize

      public void addPrize(Money prize)
      Registers a prize for winners or participants.
    • getPrizes

      public List<Money> getPrizes()
      Returns an unmodifiable list of prizes.
    • getDescription

      public String getDescription()
    • setDescription

      public void setDescription(String description)
    • toString

      public String toString()
      Overrides:
      toString in class Object