Package megamek.client.generator
Class RandomCallsignGenerator
java.lang.Object
megamek.client.generator.RandomCallsignGenerator
Save File Formatting: callsign, weight Callsign is a String that does not include a ',' Weight is an integer weight
that is used during generation
-
Method Summary
Modifier and TypeMethodDescriptiongenerate()static RandomCallsignGeneratorRetrieves a singleton instance of theRandomCallsignGenerator.static RandomCallsignGeneratorgetInstance(boolean useTestDirectory) Returns an instance of theRandomCallsignGeneratorclass.
-
Method Details
-
getInstance
Retrieves a singleton instance of theRandomCallsignGenerator.- Returns:
- the singleton instance of
RandomCallsignGenerator
-
getInstance
Returns an instance of theRandomCallsignGeneratorclass. The instance retrieved depends on whether the test directory is being used or not.- Parameters:
useTestDirectory- a boolean indicating whether to use the test directory. Iftrue, the instance specific to the test directory will be returned. Iffalse, the default instance will be returned.- Returns:
- an instance of
RandomCallsignGenerator, either for the test directory or the default instance, based on the parameter value.
-
getWeightedCallsigns
-
generate
-