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

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

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

import org.apiguardian.api.*;

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

/**
 * Fluent interface to configure the generation of Long and long values.
 */
@API(status = MAINTAINED, since = "1.0")
public interface LongArbitrary extends NumericalArbitrary {

	/**
	 * Set the allowed lower {@code min} (included) and upper {@code max} (included) bounds of generated numbers.
	 */
	default LongArbitrary between(long min, long max) {
		return greaterOrEqual(min).lessOrEqual(max);
	}

	/**
	 * Set the allowed lower {@code min} (included) bound of generated numbers.
	 */
	LongArbitrary greaterOrEqual(long min);

	/**
	 * Set the allowed upper {@code max} (included) bound of generated numbers.
	 */
	LongArbitrary lessOrEqual(long max);

	/**
	 * Set shrinking target to {@code target} which must be between the allowed bounds.
	 */
	@API(status = MAINTAINED, since = "1.4.0")
	LongArbitrary shrinkTowards(long target);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy