net.jqwik.engine.facades.ArbitraryFacadeImpl Maven / Gradle / Ivy
package net.jqwik.engine.facades;
import java.util.*;
import java.util.function.*;
import java.util.stream.*;
import net.jqwik.api.*;
import net.jqwik.api.arbitraries.*;
import net.jqwik.engine.properties.arbitraries.*;
import net.jqwik.engine.properties.arbitraries.exhaustive.*;
/**
* Is loaded through reflection in api module
*/
public class ArbitraryFacadeImpl extends Arbitrary.ArbitraryFacade {
@Override
public Optional> flatMapExhaustiveGenerator(
ExhaustiveGenerator self, Function> mapper
) {
return ExhaustiveGenerators.flatMap(self, mapper);
}
@Override
public SizableArbitrary> list(Arbitrary elementArbitrary) {
return new ListArbitrary<>(elementArbitrary);
}
@Override
public SizableArbitrary> set(Arbitrary elementArbitrary) {
return new SetArbitrary<>(elementArbitrary);
}
@Override
public SizableArbitrary> stream(Arbitrary elementArbitrary) {
return new StreamArbitrary<>(elementArbitrary);
}
@Override
public SizableArbitrary> iterator(Arbitrary elementArbitrary) {
return new IteratorArbitrary<>(elementArbitrary);
}
@Override
public SizableArbitrary array(Arbitrary elementArbitrary, Class arrayClass) {
return new ArrayArbitrary<>(elementArbitrary, arrayClass);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy