Class VoidGenerator

java.lang.Object
com.pholser.junit.quickcheck.generator.Generator<Void>
com.pholser.junit.quickcheck.generator.VoidGenerator
All Implemented Interfaces:
Gen<Void>, Shrink<Void>

public class VoidGenerator extends Generator<Void>
Produces values for property parameters of type void or Void.
  • Constructor Details

    • VoidGenerator

      public VoidGenerator()
  • Method Details

    • generate

      public Void generate(SourceOfRandomness random, GenerationStatus status)
      Description copied from interface: Gen
      Generates a value, possibly influenced by a source of randomness and metadata about the generation.
      Parameters:
      random - source of randomness to be used when generating the value
      status - an object that can be used to influence the generated value. For example, generating lists can use the size method to generate lists with a given number of elements.
      Returns:
      the generated value
    • canRegisterAsType

      public boolean canRegisterAsType(Class<?> type)
      Description copied from class: Generator
      Tells whether this generator is allowed to be used for property parameters of the given type.
      Overrides:
      canRegisterAsType in class Generator<Void>
      Parameters:
      type - type against which to test this generator
      Returns:
      true if the generator is allowed to participate in generating values for property parameters of type