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

net.jqwik.api.arbitraries.IteratorArbitrary Maven / Gradle / Ivy

There is a newer version: 1.9.2
Show newest version
package net.jqwik.api.arbitraries;

import java.util.*;

import org.apiguardian.api.*;

import static org.apiguardian.api.API.Status.*;

/**
 * Fluent interface to add functionality to arbitraries that generate instances
 * of type {@linkplain Iterator}
 */
@API(status = MAINTAINED, since = "1.3.2")
public interface IteratorArbitrary extends StreamableArbitrary> {

	/**
	 * Fix the size to {@code size}.
	 *
	 * @param size The size of the generated iterator
	 * @return new arbitrary instance
	 */
	@Override
	default IteratorArbitrary ofSize(int size) {
		return ofMinSize(size).ofMaxSize(size);
	}

	/**
	 * Set lower size boundary {@code minSize} (included).
	 *
	 * @param minSize The minimum size of the generated iterator
	 * @return new arbitrary instance
	 */
	IteratorArbitrary ofMinSize(int minSize);

	/**
	 * Set upper size boundary {@code maxSize} (included).
	 *
	 * @param maxSize The maximum size of the generated iterator
	 * @return new arbitrary instance
	 */
	IteratorArbitrary ofMaxSize(int maxSize);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy