net.jqwik.engine.properties.arbitraries.exhaustive.IterableBasedExhaustiveGenerator Maven / Gradle / Ivy
package net.jqwik.engine.properties.arbitraries.exhaustive;
import java.util.*;
import net.jqwik.api.*;
import org.jspecify.annotations.*;
class IterableBasedExhaustiveGenerator implements ExhaustiveGenerator {
final private Iterable iterable;
final private long maxCount;
IterableBasedExhaustiveGenerator(Iterable iterable, long maxCount) {
this.iterable = iterable;
this.maxCount = maxCount;
}
@Override
public long maxCount() {
return maxCount;
}
@Override
public Iterator iterator() {
return iterable.iterator();
}
}