Class ToDoubleFunctionGenerator<T>

java.lang.Object
com.pholser.junit.quickcheck.generator.Generator<T>
com.pholser.junit.quickcheck.generator.ComponentizedGenerator<ToDoubleFunction>
com.pholser.junit.quickcheck.generator.java.util.function.ToDoubleFunctionGenerator<T>
Type Parameters:
T - type of parameter of produced function
All Implemented Interfaces:
Gen<ToDoubleFunction>, Shrink<ToDoubleFunction>

public class ToDoubleFunctionGenerator<T> extends ComponentizedGenerator<ToDoubleFunction>
Produces values of type ToDoubleFunction.
  • Field Details

  • Constructor Details

    • ToDoubleFunctionGenerator

      public ToDoubleFunctionGenerator()
  • Method Details

    • provide

      public void provide(Generators provided)
      Description copied from class: Generator

      Supplies the available generators to this one.

      This is intended for use only by junit-quickcheck itself, and not by creators of custom generators.

      Overrides:
      provide in class ComponentizedGenerator<ToDoubleFunction>
      Parameters:
      provided - repository of available generators
    • generate

      public ToDoubleFunction<T> 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
    • numberOfNeededComponents

      public int numberOfNeededComponents()
      Description copied from class: Generator

      This is intended for use only by junit-quickcheck itself, and not by creators of custom generators.

      Overrides:
      numberOfNeededComponents in class Generator<ToDoubleFunction>
      Returns:
      how many component generators this generator needs
      See Also: