Class Models

java.lang.Object
edu.ntnu.idatt1002.k2g05.Models

public class Models extends Object
Singleton class which holds data for the application. To get the instance of the object use the getInstance() method.
  • Method Details

    • getInstance

      public static Models getInstance()
      Method for returning the single instance of the class, which contains data.
      Returns:
      the instance
    • getCurrentTournament

      public Tournament getCurrentTournament()
      Gets the current set tournament.
      Returns:
      the tournament.
    • autoSave

      public boolean autoSave()
      Method for saving the file to its previous chosen path @return true if save was successful. @throws
    • setCurrentTournament

      public void setCurrentTournament(Tournament tournament)
      Sets the current tournament.
      Parameters:
      tournament - to be set.