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

net.jqwik.engine.properties.arbitraries.randomized.FrequencyGenerator Maven / Gradle / Ivy

The newest version!
package net.jqwik.engine.properties.arbitraries.randomized;

import java.util.*;

import net.jqwik.api.*;
import net.jqwik.engine.properties.shrinking.*;
import net.jqwik.engine.support.*;

import org.jspecify.annotations.*;

class FrequencyGenerator extends ChooseRandomlyByFrequency implements RandomGenerator {

	FrequencyGenerator(List> frequencies) {
		super(frequencies);
	}

	@Override
	public Shrinkable next(Random random) {
		return new ChooseValueShrinkable<>(apply(random), possibleValues());
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy