Class TournamentRegister

java.lang.Object
edu.ntnu.idatt1002.g106.handballapp.finalprod.backend.TournamentRegister
All Implemented Interfaces:
Serializable

public class TournamentRegister extends Object implements Serializable
This class serves as the structure of a tournament register. Therefore, at its core, it works with manipulating a list of Tournament objects.
Author:
Gruppe 6
See Also:
  • Field Details

  • Constructor Details

    • TournamentRegister

      public TournamentRegister()
  • Method Details

    • addTournament

      public boolean addTournament(Tournament tournament)
      This method adds a tournament to the register.
      Parameters:
      tournament - The tournament to be added to the register
      Returns:
      Whether the tournament was added successfully to the list or not, true if it was, false if not
    • addListOfTournaments

      public boolean addListOfTournaments(List<Tournament> tournaments)
      Method to add a list of tournaments to the TournamentRegister
      Parameters:
      tournaments - List with tournaments
      Returns:
      True if every tournament was added successfully, otherwise false
    • getTournaments

      public List<Tournament> getTournaments()
      This method retrieves the list of tournaments.
      Returns:
      Tournament register, represented as a List.