net.jqwik.engine.properties.ShrinkablesGenerator Maven / Gradle / Ivy
package net.jqwik.engine.properties;
import java.util.*;
import java.util.function.*;
import net.jqwik.api.*;
public interface ShrinkablesGenerator extends Iterator> {
default ShrinkablesGenerator andThen(Supplier generatorCreator) {
ShrinkablesGenerator first = this;
ShrinkablesGenerator afterSuccessGenerator = generatorCreator.get();
return new ShrinkablesGenerator() {
@Override
public boolean hasNext() {
if (first.hasNext()) {
return true;
}
return afterSuccessGenerator.hasNext();
}
@Override
public List next() {
if (first.hasNext()) {
return first.next();
}
return afterSuccessGenerator.next();
}
};
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy