Class AcademyFactory
java.lang.Object
mekhq.campaign.personnel.education.AcademyFactory
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 Summary
Modifier and TypeMethodDescriptiongetAllAcademiesForSet
(String setName) Retrieves a list of all academies for a given set name.Retrieves a list of all set names in the AcademyFactory.static AcademyFactory
Returns an instance of the AcademyFactory.void
loadAcademyFromStream
(InputStream inputStream, String fileName) Loads academy data from an input stream and adds it to the academy map.
-
Method Details
-
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
Retrieves a list of all set names in the AcademyFactory.- Returns:
- a list of set names
-
getAllAcademiesForSet
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
Loads academy data from an input stream and adds it to the academy map.- Parameters:
inputStream
- the input stream containing the academy datafileName
- the name of the file containing the academy data
-