net.jqwik.engine.facades.RandomGeneratorFacadeImpl Maven / Gradle / Ivy
package net.jqwik.engine.facades;
import java.util.*;
import java.util.function.*;
import net.jqwik.api.*;
import net.jqwik.engine.properties.arbitraries.randomized.*;
import net.jqwik.engine.properties.shrinking.*;
/**
* Is loaded through reflection in api module
*/
public class RandomGeneratorFacadeImpl extends RandomGenerator.RandomGeneratorFacade {
@Override
public Shrinkable flatMap(Shrinkable self, Function> mapper, long nextLong) {
return new FlatMappedShrinkable<>(self, mapper, nextLong);
}
@Override
public Shrinkable flatMap(
Shrinkable self,
Function> mapper,
int genSize,
long nextLong,
boolean withEmbeddedEdgeCases
) {
return new FlatMappedShrinkable<>(self, mapper, genSize, nextLong, withEmbeddedEdgeCases);
}
@Override
public RandomGenerator filter(RandomGenerator self, Predicate filterPredicate, int maxMisses) {
return new FilteredGenerator<>(self, filterPredicate, maxMisses);
}
@Override
public RandomGenerator withEdgeCases(RandomGenerator self, int genSize, EdgeCases edgeCases) {
return RandomGenerators.withEdgeCases(self, genSize, edgeCases);
}
@Override
public RandomGenerator> collect(RandomGenerator self, Predicate> until) {
return new CollectGenerator<>(self, until);
}
@Override
public RandomGenerator injectDuplicates(RandomGenerator self, double duplicateProbability) {
return new InjectDuplicatesGenerator<>(self, duplicateProbability);
}
@Override
public RandomGenerator ignoreException(RandomGenerator self, Class extends Throwable> exceptionType) {
return new IgnoreExceptionGenerator<>(self, exceptionType);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy