Class AcademyFactory

java.lang.Object
mekhq.campaign.personnel.education.AcademyFactory

public class AcademyFactory extends Object
The AcademyFactory class is responsible for generating academy blueprints by reading the data from XML sources. It provides methods to retrieve a list of set names and a list of academies for a given set name.
  • Method Details

    • getInstance

      public static AcademyFactory getInstance()
      Returns an instance of the AcademyFactory. If an instance already exists, it returns the existing instance. If no instance exists, it creates a new instance and returns it.
      Returns:
      the AcademyFactory instance
    • getAllSetNames

      public List<String> getAllSetNames()
      Retrieves a list of all set names in the AcademyFactory.
      Returns:
      a list of set names
    • getAllAcademiesForSet

      public List<Academy> getAllAcademiesForSet(String setName)
      Retrieves a list of all academies for a given set name.
      Parameters:
      setName - the name of the set
      Returns:
      a list of academies for the given set
    • loadAcademyFromStream

      public void loadAcademyFromStream(InputStream inputStream, String fileName)
      Loads academy data from an input stream and adds it to the academy map.
      Parameters:
      inputStream - the input stream containing the academy data
      fileName - the name of the file containing the academy data