All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.jqwik.engine.properties.arbitraries.DefaultCollectionArbitrary Maven / Gradle / Ivy

There is a newer version: 1.9.1
Show newest version
package net.jqwik.engine.properties.arbitraries;

import net.jqwik.api.*;
import net.jqwik.api.arbitraries.*;

abstract class DefaultCollectionArbitrary extends MultivalueArbitraryBase implements SizableArbitrary {

	DefaultCollectionArbitrary(Arbitrary elementArbitrary) {
		super(elementArbitrary);
	}

	@Override
	public SizableArbitrary ofMinSize(int minSize) {
		DefaultCollectionArbitrary clone = typedClone();
		clone.minSize = minSize;
		return clone;
	}

	@Override
	public SizableArbitrary ofMaxSize(int maxSize) {
		DefaultCollectionArbitrary clone = typedClone();
		clone.maxSize = maxSize;
		return clone;
	}
}