Class RoundsTemplate
java.lang.Object
edu.ntnu.idatt1002.k2g05.models.rounds.RoundsTemplate
- All Implemented Interfaces:
Serializable
Class for holding a template of a round. A template is a description of how a tournament is going to be by rounds
type.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
RoundsTemplate
public RoundsTemplate()Constructor for creating a new template.
-
-
Method Details
-
addRound
Appends the specified roundType to the end of the template.null
is prohibited.- Parameters:
roundType
- to be appended to this template- Returns:
true
(as specified byCollection.add(E)
)- Throws:
NullPointerException
- if the specified element is null
-
removeRound
Removes the first occurrence of a roundType from the template, if it is present. If the template does not contain the roundType, it is unchanged. Returnstrue
if this list contained the specified element (or equivalently, if this list changed as a result of the call).- Parameters:
roundType
- to be removed from this tournament, if present- Returns:
true
if this list contained the specified roundType.
-
getRounds
-