Class AtomicIntegerGenerator

All Implemented Interfaces:
AsStringGeneratorSpec<AtomicInteger>, Generator<AtomicInteger>, GeneratorSpec<AtomicInteger>, AsGeneratorSpec<AtomicInteger>, NullableGeneratorSpec<AtomicInteger>, NumberAsGeneratorSpec<AtomicInteger>, NumberGeneratorSpec<AtomicInteger>

public class AtomicIntegerGenerator extends AbstractRandomNumberGeneratorSpec<AtomicInteger> implements NumberGeneratorSpec<AtomicInteger>
  • Constructor Details

    • AtomicIntegerGenerator

      public AtomicIntegerGenerator(GeneratorContext context)
  • 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<AtomicInteger>
      Returns:
      spec name if defined, or null otherwise
    • tryGenerateNonNull

      protected AtomicInteger tryGenerateNonNull(Random random)
      Description copied from class: AbstractGenerator
      Makes the best effort to return a non-null value. However, in certain cases this method will produce a null.
      Specified by:
      tryGenerateNonNull in class AbstractGenerator<AtomicInteger>
      Parameters:
      random - for generating the value
      Returns:
      generated value, either a null or non-null