net.jqwik.engine.facades.ExhaustiveGeneratorFacadeImpl Maven / Gradle / Ivy
package net.jqwik.engine.facades;
import java.util.function.*;
import net.jqwik.api.*;
import net.jqwik.engine.properties.arbitraries.exhaustive.*;
import org.jspecify.annotations.*;
/**
* Is loaded through reflection in api module
*/
public class ExhaustiveGeneratorFacadeImpl extends ExhaustiveGenerator.ExhaustiveGeneratorFacade {
@Override
public ExhaustiveGenerator map(ExhaustiveGenerator self, Function super T, ? extends U> mapper) {
return new MappedExhaustiveGenerator<>(self, mapper);
}
@Override
public ExhaustiveGenerator filter(ExhaustiveGenerator self, Predicate super T> filterPredicate, int maxMisses) {
return new FilteredExhaustiveGenerator<>(self, filterPredicate, maxMisses);
}
@Override
public ExhaustiveGenerator<@Nullable T> injectNull(ExhaustiveGenerator self) {
return new WithNullExhaustiveGenerator<>(self);
}
@Override
public ExhaustiveGenerator ignoreExceptions(
final ExhaustiveGenerator self,
final Class extends Throwable>[] exceptionTypes,
int maxThrows
) {
return new IgnoreExceptionExhaustiveGenerator<>(self, exceptionTypes, maxThrows);
}
}