Class LocaleGenerator

java.lang.Object
org.instancio.internal.generator.AbstractGenerator<Locale>
org.instancio.internal.generator.util.LocaleGenerator
All Implemented Interfaces:
Generator<Locale>, GeneratorSpec<Locale>

public class LocaleGenerator extends AbstractGenerator<Locale>
  • Constructor Details

  • Method Details

    • apiMethod

      public String apiMethod()
      Description copied from class: AbstractGenerator
      Returns the public API method name of the generator spec. The returned name is used for reporting validation errors.
      Specified by:
      apiMethod in class AbstractGenerator<Locale>
      Returns:
      spec name if defined, or null otherwise
    • generate

      public Locale generate(Random random)
      Description copied from interface: Generator
      Returns a generated value.

      If this method produces random data, the data needs to be generated using the provided Random instance. This ensures generated values are reproducible for a given seed value.

      Parameters:
      random - provider for generating random values
      Returns:
      generated value or null if value is nullable, could not be generated, or generation is delegated to the engine