Package org.swtpra1

Class TournamentControlMain


  • public class TournamentControlMain
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void exitApplication()
      Shuts down gracefully, making sure to stop running threads if needed.
      static TournamentControl loadTournamentControlFromFile​(java.io.File file)
      Loads the tournament control from a file.
      static void main​(java.lang.String[] args)
      The main function which parses the command line arguments, creates a TournamentControl object with the given parameters polls new data and serializes existing data asynchronously.
      static void printListFormatHelp​(java.lang.String filename)
      Prints list formatting help.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TournamentControlMain

        public TournamentControlMain()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
        The main function which parses the command line arguments, creates a TournamentControl object with the given parameters polls new data and serializes existing data asynchronously.
        Parameters:
        args - Given arguments.
      • loadTournamentControlFromFile

        public static TournamentControl loadTournamentControlFromFile​(java.io.File file)
                                                               throws java.io.IOException,
                                                                      java.lang.ClassNotFoundException,
                                                                      java.io.InvalidClassException
        Loads the tournament control from a file.
        Parameters:
        file - The file from which the tournament control is loaded.
        Returns:
        A tournament control.
        Throws:
        java.io.IOException - the file was corrupted in any way.
        java.lang.ClassNotFoundException - deserializing a completely different object fails
        java.io.InvalidClassException
      • printListFormatHelp

        public static void printListFormatHelp​(java.lang.String filename)
        Prints list formatting help.
        Parameters:
        filename - The file name which causes a problem.
      • exitApplication

        public static void exitApplication()
        Shuts down gracefully, making sure to stop running threads if needed.