Package edu.ntnu.idatt1002.k2g05
Class Models
java.lang.Object
edu.ntnu.idatt1002.k2g05.Models
Singleton class which holds data for the application. To get the instance of the object use the
getInstance()
method.-
Method Summary
Modifier and TypeMethodDescriptionboolean
autoSave()
Method for saving the file to its previous chosen path @return true if save was successful.Gets the current set tournament.static Models
Method for returning the single instance of the class, which contains data.void
setCurrentTournament
(Tournament tournament) Sets the current tournament.
-
Method Details
-
getInstance
Method for returning the single instance of the class, which contains data.- Returns:
- the instance
-
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
Sets the current tournament.- Parameters:
tournament
- to be set.
-