Package megamek
Class MegaMek
java.lang.Object
megamek.MegaMek
This is the primary MegaMek class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LocalDateTimestatic StringThis function returns the memory used in the heap (heap memory - free memory).static MMOptionsstatic SuitePreferencesstatic StringThe origin project name, i.e.static Filestatic StringgetUnderlyingInformation(String originProject) static StringgetUnderlyingInformation(String originProject, String currentProject) static voidinitializeLogging(String originProject) static voidinitializeSuiteGraphicalSetups(String currentProject) This is used to initialize suite-wide graphical setups.static voidstatic voidsetOriginProject(String originProject) Sets the origin project to the given String.
-
Constructor Details
-
MegaMek
public MegaMek()
-
-
Method Details
-
main
-
setOriginProject
Sets the origin project to the given String. The origin project is the one whose main() method has been executed to arrive here. Therefore, this method should only be called from any of the main() methods. Used for logging purposes.- Parameters:
originProject- The origin project name, e.g. MMLConstants.PROJECT_NAME
-
getOriginProject
The origin project name, i.e. the project whose main() method was executed to arrive here. As this is only a project name and not necessarily set, it should be used only for logging purposes.- Returns:
- The name of the origin project, typically either of (MM/MML/MHQ)Constants.PROJECT_NAME
-
initializeLogging
-
getMMPreferences
-
getMMOptions
-
getMemoryUsed
This function returns the memory used in the heap (heap memory - free memory).- Returns:
- memory used in kB
-
getUnderlyingInformation
- Parameters:
originProject- the project that launched MegaMek- Returns:
- the underlying information for this launch of MegaMek
-
getUnderlyingInformation
- Parameters:
originProject- the launching projectcurrentProject- the currently described project- Returns:
- the underlying information for this launch
-
getBuildDate
-
getQuickSaveFile
-
initializeSuiteGraphicalSetups
This is used to initialize suite-wide graphical setups.- Parameters:
currentProject- the currently described project
-