net.jqwik.engine.properties.arbitraries.randomized.ConstantFunctionGenerator Maven / Gradle / Ivy
package net.jqwik.engine.properties.arbitraries.randomized;
import java.util.*;
import java.util.function.*;
import net.jqwik.api.*;
import net.jqwik.api.Tuple.*;
public class ConstantFunctionGenerator extends AbstractFunctionGenerator {
public ConstantFunctionGenerator(
Class functionalType,
RandomGenerator resultGenerator,
List>, Function super List>, ? extends R>>> conditions
) {
super(functionalType, resultGenerator, conditions);
}
@Override
public Shrinkable next(Random random) {
Shrinkable shrinkableConstant = resultGenerator.next(random);
return createConstantFunction(shrinkableConstant);
}
}