net.jqwik.engine.properties.shrinking.CombinedShrinkable Maven / Gradle / Ivy
The newest version!
package net.jqwik.engine.properties.shrinking;
import java.util.*;
import java.util.function.*;
import java.util.stream.*;
import net.jqwik.api.*;
import net.jqwik.engine.support.*;
import org.jspecify.annotations.*;
public class CombinedShrinkable implements Shrinkable {
private final List> parts;
private final Function super List>, ? extends T> combinator;
public CombinedShrinkable(List> parts, Function super List>, ? extends T> combinator) {
this.parts = parts;
this.combinator = combinator;
}
@Override
public T value() {
return createValue(parts);
}
private T createValue(List> shrinkables) {
return combinator.apply(createValues(shrinkables));
}
private List