Class TournamentRegister
java.lang.Object
edu.ntnu.idatt1002.g106.handballapp.finalprod.backend.TournamentRegister
- All Implemented Interfaces:
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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addListOfTournaments
(List<Tournament> tournaments) Method to add a list of tournaments to the TournamentRegisterboolean
addTournament
(Tournament tournament) This method adds a tournament to the register.This method retrieves the list of tournaments.
-
Field Details
-
tournaments
-
-
Constructor Details
-
TournamentRegister
public TournamentRegister()
-
-
Method Details
-
addTournament
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
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
This method retrieves the list of tournaments.- Returns:
- Tournament register, represented as a List.
-