Package net.jqwik.api

Class Functions.FunctionWrapper

  • Enclosing class:
    Functions

    public static class Functions.FunctionWrapper
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <F,​R>
      FunctionArbitrary<F,​R>
      returns​(Arbitrary<R> resultArbitrary)
      Create an arbitrary to create instances of functions represented by this wrapper.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • returns

        public <F,​R> FunctionArbitrary<F,​R> returns​(Arbitrary<R> resultArbitrary)
        Create an arbitrary to create instances of functions represented by this wrapper. The generated functions are guaranteed to return the same result given the same input values. Shrinking will consider constant functions.
        Type Parameters:
        F - The exact functional type to generate
        R - The return type of the functional interface
        Parameters:
        resultArbitrary - The arbitrary used to generate return values
        Returns:
        a new arbitrary instance