Class RandomNameGenerator

java.lang.Object
host.anzo.commons.text.RandomNameGenerator

public class RandomNameGenerator extends Object
RandomNameGenerator is a singleton class that generates random names by combining adjectives and nouns loaded from text files. The generated names are unique based on the current seed.
Since:
8/17/2021
  • Method Details

    • size

      public int size()
      Returns the total size of the combined words from adjectives and nouns.
      Returns:
      the total number of unique combinations of adjectives and nouns
    • nextName

      public String nextName()
      Generates a random name by combining an adjective, a noun, and a random number. The name is generated based on the current seed, ensuring uniqueness.
      Returns:
      a randomly generated name in the format "AdjectiveNounNumber"