Class AtomicBooleanGenerator

java.lang.Object
org.instancio.internal.generator.AbstractGenerator<AtomicBoolean>
org.instancio.internal.generator.util.concurrent.atomic.AtomicBooleanGenerator
All Implemented Interfaces:
Generator<AtomicBoolean>, GeneratorSpec<AtomicBoolean>, NullableGeneratorSpec<AtomicBoolean>

public class AtomicBooleanGenerator extends AbstractGenerator<AtomicBoolean>
  • Constructor Details

    • AtomicBooleanGenerator

      public AtomicBooleanGenerator(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<AtomicBoolean>
      Returns:
      spec name if defined, or null otherwise
    • tryGenerateNonNull

      protected AtomicBoolean 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<AtomicBoolean>
      Parameters:
      random - for generating the value
      Returns:
      generated value, either a null or non-null