Class RoundsTemplate

java.lang.Object
edu.ntnu.idatt1002.k2g05.models.rounds.RoundsTemplate
All Implemented Interfaces:
Serializable

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

    • RoundsTemplate

      public RoundsTemplate()
      Constructor for creating a new template.
  • Method Details

    • addRound

      public boolean addRound(RoundType roundType)
      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 by Collection.add(E))
      Throws:
      NullPointerException - if the specified element is null
    • removeRound

      public boolean removeRound(RoundType roundType)
      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. Returns true 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

      public List<RoundType> getRounds()