Class RandomCallsignGenerator

java.lang.Object
megamek.client.generator.RandomCallsignGenerator

public class RandomCallsignGenerator extends Object
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 Details

    • getInstance

      public static RandomCallsignGenerator getInstance()
      Retrieves a singleton instance of the RandomCallsignGenerator.
      Returns:
      the singleton instance of RandomCallsignGenerator
    • getInstance

      public static RandomCallsignGenerator getInstance(boolean useTestDirectory)
      Returns an instance of the RandomCallsignGenerator class. 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. If true, the instance specific to the test directory will be returned. If false, 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

      public WeightedIntMap<String> getWeightedCallsigns()
    • generate

      public String generate()